Would be great if we could stop the Flow from with script function.
I would like to use this to create custom conditioning (e.g. If Variable = this, the flow continues, otherwise Stop).
I apologize if this already exists.
Thank you,
L.
Script Function - Stop
Moderator: Martin
-
- Posts: 53
- Joined: 17 Mar 2013 16:08
Re: Script Function - Stop
If your condition 's result leads to nowhere, your flow just stops. No further command needed
Re: Script Function - Stop
Ok,
But then how do I set it up to go on under certain conditions?
Let's say I have this.
If (value = 0)
{
}
Else
{
}
I want it to continue only if value = 0.
Is there a command to go on to next step?
Thanks.
But then how do I set it up to go on under certain conditions?
Let's say I have this.
If (value = 0)
{
}
Else
{
}
I want it to continue only if value = 0.
Is there a command to go on to next step?
Thanks.
Re: Script Function - Stop
Sure ... delete the "else"-process ... only "if" is enough to let the flow work on value==0.
Re: Script Function - Stop
Sorry I can't seem to figure this out. What am I doing wrong?
What I am trying to accomplish is this.
I have a flow needs to turn on/off screen but only if the Alarm clock app is active.
So I check if the package is running and one of the variables that this action is returning is the Index, which tells me if it is "on top" or not. It returns the index of ) for the package that is currently being displayed ("on top").
This works well and I can show the notification with the {index} and it shows me 0 when the Alarm clock is being used at the moment.
So what I want is to tell the script to stop when {index} is anything else but 0.
I am not good at Java Script (I do programming however in VB.NET).
Script:
if (index != 0)
{
}
Everything I've tried either stops the flow all the time or finishes the flow all the time. What am I doing wrong?
BTW - also this probably can be moved over to Help section instead of feature request. Even though I think the "formal Stop Flow" in the script would be much nicer solution.
Thanks a lot.
L.
What I am trying to accomplish is this.
I have a flow needs to turn on/off screen but only if the Alarm clock app is active.
So I check if the package is running and one of the variables that this action is returning is the Index, which tells me if it is "on top" or not. It returns the index of ) for the package that is currently being displayed ("on top").
This works well and I can show the notification with the {index} and it shows me 0 when the Alarm clock is being used at the moment.
So what I want is to tell the script to stop when {index} is anything else but 0.
I am not good at Java Script (I do programming however in VB.NET).
Script:
if (index != 0)
{
}
Everything I've tried either stops the flow all the time or finishes the flow all the time. What am I doing wrong?
BTW - also this probably can be moved over to Help section instead of feature request. Even though I think the "formal Stop Flow" in the script would be much nicer solution.
Thanks a lot.
L.
Re: Script Function - Stop
Why I couldn't figure this out earlier is beyond me, but my problem is now solved!
I just used the Condition - Expression to separate the paths based on {index}.
It works well.
I just used the Condition - Expression to separate the paths based on {index}.
It works well.