Display field only, if: either of two other fields has no data?
What is the formula needed to make this work? The field names I want to check for data are titled Email 1 and Phone 1. I can make the field hidden with either 'Email 1' = null or 'Phone 1' = null, but I can't figure out how to make Ninox look at both fields.
17 replies
-
The answer is already in your question : Display field only, if: 'Email 1' = null or 'Phone 1' = null
-
That formula means both Email 1 and Phone 1 have to have data entries to hide the third field. I want the third field to hide if there's data in either field, not both.
-
Actually, I did another test, and that formula only works if there is data in the Email 1 field. There is no change when there is no data in Email 1 and any data in Phone 1.
-
I tried it also, something strange is going on, i don't know eighter where the error is.
Anyone??? In the meantime, I'll also take a look at it when i have more time....
-
@Mr K.. I assume your phone number is of type Phone? If YES.. then do a check like.
length(text('Phone 1')) = 0
for a no data check.
-
OK, but that still does not work to check if either one has data. Now the formula 'Email 1' = null or length(text('Phone 1')) = 0 only hides the Display field only, if: field when a phone number is added.
-
Mr. K.. Hmm.. What platform are you on? Mac App, Ninox Cloud, iPad ?? What exactly does your Display field Only If look like? Here is mine..
-
Mac, and that is the formula I am using. When I enter day into Email 1, the third field (the one the formula is added to Display field only, if:) is still visible. When I add data to the Phone 1 field, then the third field is hidden. I can make it work reversed using length(text('Phone 1')) = 1 or 'Email 1' != null. Then the third field is not visible until data is entered in either of the other two fields, but that is the opposite of what I want.
-
That's enter "data"
-
length(text(Phone)) < 1 and length(text(Email)) < 1
Does the trick....
-
@Steven .. would that be an "or" .. given the requirement of "either of two other fields has no data" ??
-
@Michael
No, the field in my cace (AND) is only visable if both are emty, so if one of them is not, it will hide.
Tried it with OR and doesn't work....(reverse thinking)
And I think that is what Mr. K. wanted : If one of the two fields are filled with data the third field must hide, that's what I think I understand from his answers above, if not Sorry Mr.K. ;-)
-
@Steven.. Ahh.. I see the confusion .. if you read the title it says..
"Display field only, if: either of two other fields has no data?"
I guess the requirement changed... Thanks!
-
Yes, this forum needs an "Edit" mode to correct posted messages after we hit the 'post' button, wouldn't you think?
-
Thank you, Steven! That works perfectly. There's no way I would have ever figured out that code on my own. And you are so right, this forum needs an update badly. Search the forum is useless, no edit, no way to attach a file other than an image.
-
I believe there is something in the works to address the forum issues.. Glad you got it working..
-
I've been told that as well. Can't happen too soon!
Content aside
- 5 yrs agoLast active
- 17Replies
- 4365Views