I have Users as a Table (Emp Id, Emp Name). I...

I have Users as a Table (Emp Id, Emp Name). In Transaction table, i just want them to enter Emp Id first and then system will fetch their name from “Users” table. In transaction table, the field name “Emp Id”, added “Users[Emp Id]” as valid if. But system shows up the information as drop down. I just want as a text box where they need to input the Id. If Id is not in the “Users” table, then system can show error message.

Can you please help me out in this regard?

0 12 482
12 REPLIES 12

Hi @John_Henry_Joseph Try something like this

ANY(SELECT(Users[Emp Name],[Emp ID]=[_THISROW].[Emp ID] put this in App formula

@Lynn Thanks. This expression to get the Emp Name… by supplying Emp Id. For this purpose we can use Lookup function. What i need is, the user should supply his Emp Id. And the system should check the Emp id is in “Users” table or not.

Wow.

Now I think I get it!

If IN(…) is used in the Valid_If condition it will return a list.

If used in other expression areas it returns TRUE/FALSE.

That almost makes sense - but the inconsistency can be confusing (at least to me)!

Good!

@John_Henry_Joseph Hi sorry I misunderstood your question.

You can check the status with AND(TRUE,IN([Emp ID],Users[Emp ID]))

@Aleksi_Alkio Perfect. Thanks lot. Translate

@Aleksi_Alkio - can you clarify why the use of AND(TRUE is needed?

Just for learning…

Check the section “1. A List of Constant Values” from this article… https://help.appsheet.com/ux/dropdowns-in-forms/dropdown-from-valid_if.

You need to add a second element so it won’t create a list… and the AND(TRUE,IN(…)) is doing that. Dropdown from Valid_If help.appsheet.com

@Aleksi_Alkio - thanks for sharing!

Love this community.

Always learning something new.

@Aleksi_Alkio - I though IN(…) already returned TRUE/FALSE and not a list.

I guess I missed that.

It will do that if you don’t use it with the Valid_If.

Top Labels in this Space