Hi All,
I would say that understand the basic formals in powerapps, but this one stumpped me.
I'm looking at validating a text input with salesforce case numbers, the idea would be the user enters the case number, when they click the button the formula would check to see if the SF case is valid and is in a responded status, if this returned true it would take the user to the next screen.
We are stuck between using lookup and search to get a true or false reply, below is our thinking and are open to ideas:
If(Not(IsBlank(LookUp(Cases.'Case Number','Case Number' = TextInput1.Text, Cases.Status = "Responded"),Navigate('Main Screen',ScreenTransition.Fade),Notify("Case Cannot be found")))
Dave
Solved! Go to Solution.
You're pretty close! Your Lookup function is not correct. A Lookup needs (at a minimum) a datasource/table, and a narrowing condition. It returns either a reducing value or an entire record. You can get more details on it in the documentation.
So, your formula should be this (the full record return from lookup method):
If( Not(IsBlank(LookUp(Cases,'Case Number' = TextInput1.Text && Cases.Status = "Responded").'Case Number')), Navigate('Main Screen',ScreenTransition.Fade), Notify("Case Cannot be found") )
Or, the reducing version:
If( Not(IsBlank(LookUp(Cases,'Case Number' = TextInput1.Text && Cases.Status = "Responded", 'Case Number'))), Navigate('Main Screen',ScreenTransition.Fade), Notify("Case Cannot be found") )
I hope that is helpful for you.
You're pretty close! Your Lookup function is not correct. A Lookup needs (at a minimum) a datasource/table, and a narrowing condition. It returns either a reducing value or an entire record. You can get more details on it in the documentation.
So, your formula should be this (the full record return from lookup method):
If( Not(IsBlank(LookUp(Cases,'Case Number' = TextInput1.Text && Cases.Status = "Responded").'Case Number')), Navigate('Main Screen',ScreenTransition.Fade), Notify("Case Cannot be found") )
Or, the reducing version:
If( Not(IsBlank(LookUp(Cases,'Case Number' = TextInput1.Text && Cases.Status = "Responded", 'Case Number'))), Navigate('Main Screen',ScreenTransition.Fade), Notify("Case Cannot be found") )
I hope that is helpful for you.
many thanks for help, seeing how you have presented it, I better understand.
User | Count |
---|---|
185 | |
123 | |
90 | |
46 | |
42 |
User | Count |
---|---|
268 | |
159 | |
130 | |
84 | |
77 |