I have a textbox called CompanyName in my powerapp with SharePoint as the datasource. In the OnChange of the CompanyName textbox, I have written below piece of code.
If(LookUp('DS', DataCardValue5.Text =CompanyName && CompanyDecomissionedFlag="Y",true), Notify("You cannot enter this CompanyName, because it's decommissioned",NotificationType.Error), false);
Even-though the above code is NotificationType.Error, I am able to submit the form successfully.
It should actually prevent me from submitting the form, if I enter a companyname which is decommissioned. Any inputs would be helpful.
Solved! Go to Solution.
Hi @PowerAddict ,
I included the same piece of code in OnSelect of my submit button. When I enter the name in the textbox, which is decommissioned, click on submit button, it still allows me to save the record. It throws me the validation message as expected, but shouldn't allow me to save
If(LookUp('DS', DataCardValue5.Text =CompanyName && CompanyDecomissionedFlag="Y",true), Notify("You cannot enter this CompanyName, because it's decommissioned",NotificationType.Error), false); SubmitForm(NewForm);
User | Count |
---|---|
184 | |
122 | |
91 | |
47 | |
42 |
User | Count |
---|---|
271 | |
159 | |
130 | |
85 | |
78 |