I created a canvas app using sharepoint list.I have three non mandatory fields here. (Zip, SSN, Date of Birth)
The Submit button should be disabled under the following condition
If ZIP CODE has value and if the value doesnt matches the regex expression or
If SSN has value and if the value doesnt matches the regex expression or
If Date Of Birth and if the value doesnt matches the regex expression
If they dont have value , The submit button is enabled (this is by default , since they are non-mandatory)
How can I combine all the three conditions in one formula?
The below one is throwing error.Please help.
Under "DisplayMode" of Button , I have include this piece of code.
If(DataCardValue49.SelectedDate > Today(), DisplayMode.Disabled, DisplayMode.Edit)
If(
Not(IsBlank(DataCardValue50.Text)),
If(
IsMatch(DataCardValue50.Text,"^\d{3}-\d{2}-\d{4}$",MatchOptions.Complete),
DisplayMode.Edit,
DisplayMode.Disabled
),
DisplayMode.Edit
)
If(
Not(IsBlank(DataCardValue48.Text)),
If(
IsMatch(DataCardValue48.Text,"^((\d{5}-\d{4})|(\d{5})|([A-Z]\d[A-Z]\s\d[A-Z]\d))$",MatchOptions.Complete),
DisplayMode.Edit,
DisplayMode.Disabled
),
DisplayMode.Edit
)
Solved! Go to Solution.
This code worked. Thanks @JR-BejeweledOne for helping out.
If( !IsBlank(DataCardValue48.Text) && !IsMatch(DataCardValue48.Text,"^((\d{5}-\d{4})|(\d{5})|([A-Z]\d[A-Z]\s\d[A-Z]\d))$",MatchOptions.Complete),DisplayMode.Disabled, !IsBlank(DataCardValue48.Text) && !IsMatch(DataCardValue50.Text, "^\d{3}-\d{2}-\d{4}$",MatchOptions.Complete),DisplayMode.Disabled, DataCardValue49.SelectedDate > Today(), DisplayMode.Disabled, DisplayMode.Edit ) ;
If(
(If(
Not(IsBlank(DataCardValue9.Text)),
IsMatch(
DataCardValue9.Text,
"^((\d{5}-\d{4})|(\d{5})|([A-Z]\d[A-Z]\s\d[A-Z]\d))$",
MatchOptions.Complete
),
true
) && If(
Not(IsBlank(DataCardValue10.Text)),
IsMatch(
DataCardValue10.Text,
"^\d{3}-\d{2}-\d{4}$",
MatchOptions.Complete
),
true
) && DataCardValue14.SelectedDate > Today()),
DisplayMode.Disabled,
DisplayMode.Edit
)
User | Count |
---|---|
163 | |
89 | |
71 | |
64 | |
62 |
User | Count |
---|---|
210 | |
151 | |
97 | |
84 | |
66 |