Re: IsMatch - Match Regular Expression with Dynamic Pattern stored in data source table for Gallery
Hi
Okay I think I have a clue of what you are trying to achieve here, for this, I do not think u really need to use a Regex Stored in on the data source to achieve this, you can have a label that checks for data validation for each control inside your gallery and hard code your Regex function with a if statement to achieve this
Here is a PowerFx Snippet to achieve this :
If( //Condtional Statement
CountIf( //If Statement
Split( //Split each string into substrings
TextInput1.Text, //TextInputControl in your Gallery
"" //Splitting value
),
Not( //Condition Expression
IsMatch( //Match Function
Value, //Condition Value
"([A-Za-z0-9])" //RegexExpression
)
)
) > 0, //Condition
"Wrong Character in text" //DisplayText
)
Outside your Gallery, you can have a label that check all the validation label for any errors in your Data Input