Global Variable is varStatus
Submit Button contains the following statement. I have the varStatus value visible on my form for troubleshooting and I can see that it is set to Pending Manager Approval. However, when I click submit it just sets varStatus to Approved when it should set it to Pending HR Approval.
Could you please share a bit more about your app's configuration?
Further, could you please share a bit more about the value of varStatus variable before clicking "Submit" button?
I have made a test on my side and don't have the issue that you mentioned. Please check if the value of the varStatus variable is "Pending Manager Approval" before clicking "Submit" button.
In addition, you could also consider take a try to remove the SubmitForm function from the "Submit" button, then try it again to check if the issue still exists. Also check if you have typed proper formula within the OnSelect property of the "Submit" button.
Please also check if you have added the Set(varStatus,"Approved") formula within other Action rule properties (e.g. OnSelect, OnSuccess, etc.) within your app.
My form contains the following.
TextInput6 default = varStatus
DataCardValue21 default = Parent.Default
Upon entering a new list item the Status is Submitted
My flow sends and email and sets the Status to Pending Manager Approval (I cut and pasted this into my Submit button formula).
On my Edit form I have an Approve button with the OnSelect formula of - If(varStatus="Pending Manager Approval",Set(varStatus,"Pending HR Approval"),Set(varStatus,"Approved"));SubmitForm(FormEdit)
I tried taking off the SubmitForm, and it still does not work, I can see on my form that it is setting the value of varStatus to Approved.
I tried deleting the OnSelect formula and putting it back, I also deleted the button altogether and it still did not work.
When I open my edit form I can see the TextInput6(varStatus) is blank while the DataCardValue21 is Pending Manager Approval. When I click the Approve button (without submit) I see that is it setting the TextInput6(varStatus) to Approved while the DataCArdValue21 still shows Pending Manager Approval.
Is there any other information you need to try to help with this?
Check it out!
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
The largest Power BI, Power Platform, and Data conference in New Zealand