UX name is equal to the field name

When inputting UX, determine whether the UX name is equal to the field name in TABLE, and read its value. What should I do?
Show whether select(account[E-Mail],and([E-Mail]=USEREMAIL(),UXname??=table[fieldname]??,[fieldname]??="TRUE"))
0 5 121
  • UX
5 REPLIES 5

What do you mean by "inputting UX"? Could you please explain? 

I mainly want to ask, how to get "VIEWNAME" and "fieldname" in TABLE to use as SELECT.

We cannot use variables to reference Column names.  You would need to write explicit conditions in the expression.  So for example, if you had an input field named "Column Value"  where the user chooses the name of the column for which value they want to see, you could implement a SWITCH() statement like this:

SWITCH([Column Value],
     "Column1", [Column1],
     "Column2", [Column2],
     "Column3", [Column3],
     "Column4", [Column4],
     "Column5", [Column5],
     ...
     "Default Value"
)

 

 

Thank you,but I mainly want to ask, how to get "VIEWNAME" and "fieldname" in TABLE to use as SELECT.

 

AppSheet operates a little different than other development platforms.  Instead of trying to force a design from an expression based on how you think it should work, please explain in words what you are trying to accomplish.  Then we can help with the design and expression.

In the meantime, here is what I can help with on some pieces...

You can obtain the current view name using the CONTEXT() function like so:

CONTEXT("View")

You can also get the current view type:

CONTEXT("ViewType")

 

It is not clear what you are trying to do with "fieldname" so its hard to help here. 

In your expression you have table[fieldname].  This returns a list of values for the column fieldname from table.  You cannot compare this directly to a value.  You can wrap this with an ANY() function like this ANY(table[fieldname]) which will return the first value from the list and then compare THAT to a value.

Top Labels in this Space