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.