Hi
I have created a flow with variables that need to do a bespoke approval flow. If the flow fails or succeeds it returns a result to say success or failed.
The problem is because it is a approval flow - the wait time could be days. The main reason I have a response is to basically pick up if there were an error and the approval flow cancelled / errored out and was never created.
I have a timer on my app screen that is hidden. I start the timer when the user presses the button. I would like the navigation to the success screen to happen after 6 seconds and not wait for a response back - because by that time I know the approval flow has gone through without errors and navigate to Failed screen when response comes back within 6 seconds that approval has failed.
This is my code:
Set(tStart,true);
If(HCCApproveDocuments.Run(ddApproval.Selected.Value, Text(tbRequester.Text,Email), Coalesce(Text(cbApprover.Selected.Mail, Email),"noemail.yahoo.co.uk"),lFileName.Text,lURL.Text,{email_2:Text(Coalesce((cbEndorser.Selected.Mail),"noemail@yahoo.co.uk"),Email),email_3:Text(cbReviewer.Selected.Mail,Email),text_3:tbComments.Text}).response="Success" Or TimerSuccess.Duration > 6000,Navigate(Success),Navigate(Failed)) ;
The problem is that it ignores the timer and wait for a response before it navigates and obviously this won't work as an approval can take days before someone press approve or reject.
Thanks
Solved! Go to Solution.
can you try this:
Set(varFlowResponse, "-");
Set(tStart,false); Set(tStart,true);
Set(varFlowResponse,
HCCApproveDocuments.Run(ddApproval.Selected.Value,
Text(tbRequester.Text,Email),
Coalesce(Text(cbApprover.Selected.Mail, Email),"noemail.yahoo.co.uk"),
lFileName.Text,
lURL.Text,
{
email_2: Text(Coalesce((cbEndorser.Selected.Mail),"noemail@yahoo.co.uk"),Email),
email_3: Text(cbReviewer.Selected.Mail,Email),text_3:tbComments.Text
}
).response
);
TimerSuccess.OnTimerEnd =
Set(tStart, false);
If(
varFlowResponse = "-", Navigate(Success),
varFlowResponse = "Success", Navigate(Success),
varFlowResponse = "Failed", Navigate(Failed)
);
TimerSuccess.Duration = 6000
TimerSuccess.Start = tStart
can you try this:
Set(varFlowResponse, "-");
Set(tStart,false); Set(tStart,true);
Set(varFlowResponse,
HCCApproveDocuments.Run(ddApproval.Selected.Value,
Text(tbRequester.Text,Email),
Coalesce(Text(cbApprover.Selected.Mail, Email),"noemail.yahoo.co.uk"),
lFileName.Text,
lURL.Text,
{
email_2: Text(Coalesce((cbEndorser.Selected.Mail),"noemail@yahoo.co.uk"),Email),
email_3: Text(cbReviewer.Selected.Mail,Email),text_3:tbComments.Text
}
).response
);
TimerSuccess.OnTimerEnd =
Set(tStart, false);
If(
varFlowResponse = "-", Navigate(Success),
varFlowResponse = "Success", Navigate(Success),
varFlowResponse = "Failed", Navigate(Failed)
);
TimerSuccess.Duration = 6000
TimerSuccess.Start = tStart
User | Count |
---|---|
167 | |
96 | |
79 | |
72 | |
59 |
User | Count |
---|---|
209 | |
167 | |
98 | |
94 | |
78 |