Visible property
Special value available in formulas:
Item
The text box this property is part of, enabling multiple checked items in the app designer to share the same formula and be updated all at once.
Consider the fields Field1 and Field2, which should
only be considered to be valid if their values are
greater than 4. Without using the Item
value, the Valid
property of Field1 would need to use the formula Field1 > 4Field1 > 4 and the Valid
property of Field2 would need to use the formula Field2 > 4Field2 > 4.
Using Item
, both formulas can read Item > 4Item > 4. This is useful
if you have many fields and you want to be able to update their
formulas all at once. To do so, click their check boxes in Calcapp
Creator and make sure that a checked field is selected. Then, when you
update a formula for one checked field, you update all the other
checked fields too, which is a great timesaver.
Use Item
in exactly the same way you'd use the regular
name. TextBox1.VisibleTextBox1,Visible and Item.VisibleItem,Visible are equivalent, for
instance.
Whether the text box is visible.
By changing the visibility of a text box using a formula, you can show information selectively to users based on information they have entered in the app, based on their email address or based on the tags you have assigned to them.
If this property is not set, it returns FALSE.
Examples
Shows a text box only if the switch field named ShowMoreInformation is toggled to its "on" position.
Shows a text box only if Field1 is invalid, that is, if its Valid property returns FALSE. If the text box appears just below the field, it can contain tips for entering correct values.
Shows a text box only if Field1.ValueField1,Value is odd and Field2.ValueField2,Value is less than 3.
Shows a text box if a single field of the Field1:Field50Field1:Field50 range is invalid (as determined by the Valid property of the fields). This range includes the two fields Field1 and Field50 and all fields that appear between them.
The formula (Field1:Field50).Valid(Field1:Field50),Valid returns a logical array with the same number of elements as there are fields in the Field1:Field50Field1:Field50 range, like this array: { TRUE, FALSE, TRUE, TRUE, ...}{ TRUE; FALSE; TRUE; TRUE; ...}. The AND function returns TRUE only if all elements of the array are TRUE.
Finally, the ! operator negates the returned logical value from AND, thereby turning FALSE into TRUE and TRUE into FALSE. The end result is that the text box is shown if a single field of the given range is invalid.
Shows a text box if a single field of the Field1:Field50Field1:Field50 range is not filled out (that is, has a value which is blank). This range includes the two fields Field1 and Field50 and all fields that appear between them.
The formula ISDEFINED(Field1:Field50)ISDEFINED(Field1:Field50) returns a logical array with the same number of elements as there are fields in the Field1:Field50Field1:Field50 range, like this array: { TRUE, FALSE, TRUE, TRUE, ...}{ TRUE; FALSE; TRUE; TRUE; ...}. The AND function returns TRUE only if all elements of the array are TRUE.
Finally, the ! operator negates the returned logical value from AND, thereby turning FALSE into TRUE and TRUE into FALSE. The end result is that the text box is shown if a single field of the given range is not filled out.
Shows a text box only if the signed-in user has an email address that ends with "example.com". (To enable users to sign in, make your app private.)
Shows a text box only if the signed-in user is associated with the tag "Employee". (To enable users to sign in, make your app private.)