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?
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 - 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.
User | Count |
---|---|
37 | |
31 | |
29 | |
22 | |
18 |