In the field shown below- since it is a link field, i want to show an error if it does not contain two backslashes "//"
And it is working fine with this formula
If((IsBlank(Find("//",DataCardValue2.Text))),"An entry is required or has an invalid value.")
The value entered here does not have 2 backslashes and so it shows an error.
The problem is that even when somebody is filling out the form, it shows out the error by default. I want it to behave like other fields which show error only if a mandatory field is blank upon submission not. Other fields have this error message-
If(Not(IsBlank(Parent.Error)),"An entry is required or has an invalid value.")
Solved! Go to Solution.
I would approach the problem a little differently. Simplified, I would put a label on the screen that is always present but disappears when the condition is met. I would disable the submit button unless the criteria was met.
@Drrickryp Thanks for trying to assist and the novel suggestion.
The issue is that we have around 50 fields in this form- for each field we have an error message that displays if the value is blank. Just for this one field where i don't want it to be either blank or not containing "//"- i wouldn't want to change the submit button's visible property.
In order to be consistent, have to find a way to display the error message. Please suggest!
Your direction helped me achieve it- a lil differently though. I took these actions
Error Message, Text Property = If(Or(Not(IsBlank(Parent.Error)),!IsMatch(DataCardValue45.Text,"//",Contains)),"An entry is required or has an invalid value.")
Then, on Visible property of error message- i define a global variable named "gLinkError"
The variable turns true when the OnSAVE property of SP Integration form is saved without any value or without "//"- using Set(gLinkError,true)
OnNEW Property of SP Integration form is set to Set(gLinkError,false)
Thanks both again!
Check out the News & Announcements to learn more.
Did you know that you can visit the Power Query Forum in Power BI and now Power Apps
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
Check out our new Discover Your Career Path blog post series and get all the details.