What does [_This] refer to?
Solved! Go to Solution.
The majority of the times I use [_this] is inside a Show If/Required if/etc. when I need to use the value that has been entered or selected by the user.
For instance:
If I have a reference field in a form, thatโs always preset by an action, I can usually hide that inside the form.
CONTEXT("ViewType") <> "Form"
But if I allow some other ways of creating the record, that essential reference link might be left blank - at which point I need to show that field to the users so they can fill it.
If(Context("ViewType") = "Form", IsBlank([_THIS]), true)
This hides the field inside the form if the field itself has a value, if its left blank then it will be shown - but as soon as the user makes a change it will immediately disappear.
Another common use will be to check if the value entered into a field is already inside the table:
Not(In([_THIS], Select(Table[Same_Column_As_THIS], [RowID] <> [_thisrow].[RowID])))
Just to add to @LeventK โthisโ in general in a lot of programming languages is actually a self reference, literally meaning to reference โitselfโ. So when used in Appsheet within an expression for a column [_THIS] literally points to the column itself.
The majority of the times I use [_this] is inside a Show If/Required if/etc. when I need to use the value that has been entered or selected by the user.
For instance:
If I have a reference field in a form, thatโs always preset by an action, I can usually hide that inside the form.
CONTEXT("ViewType") <> "Form"
But if I allow some other ways of creating the record, that essential reference link might be left blank - at which point I need to show that field to the users so they can fill it.
If(Context("ViewType") = "Form", IsBlank([_THIS]), true)
This hides the field inside the form if the field itself has a value, if its left blank then it will be shown - but as soon as the user makes a change it will immediately disappear.
Another common use will be to check if the value entered into a field is already inside the table:
Not(In([_THIS], Select(Table[Same_Column_As_THIS], [RowID] <> [_thisrow].[RowID])))
User | Count |
---|---|
43 | |
30 | |
26 | |
14 | |
14 |