Hi Experts,
I need a formula on a button that will take the user to the correct screen depending on an IF.
If the users email address appears in the 1stApprover column of a sharepoint list & the ChangeStatus of the row item is set to "Submitted" then navigate to MyApprovals screen. I then want the same for 2ndApprover but to navigate to MyApprovals2 screen. Below is where my mind has gone with this code so far but i've made a mistake somewhere along the way, please help
If(ChangeMaster, User().Email in '1stApprover') && ((ChangeStatus="Submitted");Navigate(MyApprovals,Cover)
OR
If(ChangeMaster, User().Email in '2ndApprover') && ((ChangeStatus="1st Stage Approved");Navigate(MyApprovals2,Cover)
Thanks in advance!
Hi @Drrickryp , @cha_cha , @BideyYusuf
Thank you all for your help, I tried all and kept getting errors but managed to adapt @Drrickryp slightly using the below which appears to have worked
If(!IsBlank(LookUp(ChangeMaster, User().Email in '2ndApprover' && ChangeStatus="1st Stage Approved")) , Navigate(MyApprovals2,Cover), Navigate(MyApprovals))
Hello @Dave-ITMan
There are tons of ways to do this but here's my entry
Navigate(
If(User().Email in '1stApprover') And ChangeStatus="Submitted",MyApprovals,MyApprovals2),
Cover)
If(!IsBlank(LookUp(ChangeMaster, User().Email in '2ndApprover' && ChangeStatus="1st Stage Approved"}) , Navigate(MyApprovals2,Cover), Navigate(somewhere else))
hi @Dave-ITMan
It seems you made mistake with "Comma" you used semi-Colon";" instead of "," and also the bracket.
If(ChangeMaster, (User().Email in '1stApprover') && (ChangeStatus="Submitted"), Navigate(MyApprovals,Cover))
You can also use Lookup
If(LookUp(ChangeMaster,User().Email in '1stApprover',true)&& ChangeStatus="Submitted",Navigate(MyApprovals,Cover))
Check if this helps.