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 496
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