Can anyone assist me in getting a visibility region to show only if there is text entered into the previous edit field?
The problem is this:
I have an edit field named "Other". I want a second edit field to show if anything is entered into the first edit field.
I came across some thoughts here on the forum while trying to post this question that indicated I may be able to accomplish this with the following:
DOCUMENT.Other == ""
That did not work. That actually has the reverse effect, I.E. the second field is visible only UNTIL something is entered into the first field.
I tried finding anything about NOT NULL, I tried just DOCUMENT.Other ==, etc.
BTW, do NOT try this line in the visibility region - it crashes Centricity:
DOCUMENT.Other <>
Good thing I was in my demo database! 🙂
document.other<>""
Jfitzmd has the correct answer. the "Not Equal to" symbol in MEL code is <>
Just like an equals sign, you have to have something on the right side, or else it will crash your code. Since a visibility field is looking for a true statement in order to display, your original code is telling the edit field to only show up if DOCUMENT.Other is empty.
Jfitzmd's code says, only show if DOCUMENT.Other is not empty.
Hope that helps you clarify for future use. Also, great job on using a demo database for testing! Way to use those best practices! keep it up! 🙂
Thank you both. Go figure! I was working along the right path on this one, I just didn't follow it far enough! 🙂
One additional note:
Edit fields behave differently than other fields. To 'register' that something was entered, the user must tab or click out of the field. That means the visibility layer will not be visible until the user changes cursor focus. Because this can be confusing for users, I typically will add a fake button with a 'Record' label and no connection for these situations. It does nothing but change the cursor focus when the user clicks on it thereby permitting the visibility layer to display without breaking workflow and improves compliance with populating the item(s) in the visibility.