Announcements
Hi all,
I am wondering if anyone could think of a straightforward solution before I really get into the weeds here. I have a form and a patch button. There are 3 fields in the form that must be co-populated. That is, if one of those items contains data, the rest should contain data as well. However, the form should still be patchable if those fields are all blank, and I should add that those fields are only a small subset of the entire form. I was thinking of creating a variable and adding one to it if one of the fields on the screen was not blank. Then I could add a patch condition checking if the total value of that variable is equal to 0 or 3.
Thanks
Hi @shuhn1229 ,
You can try something like this:
With( { Condition1: (IsBlank(Field1) && IsBlank(Field2) && IsBlank(Field3)) || (!IsBlank(Field1) && !IsBlank(Field2) && IsBlank(Field3)) } If( Condition1 = true, //Patch function containing data of 3 fields , //Patch function without those 3 fields ) )
Hope this format helps
I haven't played around with forms, but this is usually the type of code I use (I check the length of the field instead of checking for empty/blank because I find it to be more accurate with less code, but you can do whatever you want):
If(
//check if all fields are empty OR all fields are NOT empty
Or(
And(
Len(Field1.Text) = 0,
Len(Field2.Text) = 0,
Len(Field3.Text) = 0
),
Len(Field1.Text) > 0,
Len(Field2.Text) > 0,
Len(Field3.Text) > 0
)
[no error],
[error]
);
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 396 Super User 2026 Season 2
Mohsin Ali 323
WarrenBelz 193 Most Valuable Professional