Populate field with values related to List

Pavel1
New Member

Hello community, need your help, please.

What I need to achieve:

For each new record created in the form linked to the table 1, a user should be able to select one or multiple values from Column A in the table 2. This I was able to achieve with EnumList and suggested values Table2[Column A].

Now, based on the selected values from Table2 [Column A], the app should automatically pick related values in the column B in the same table 2 and populate another field in the form.

Many thanks for any ideas!

Solved Solved
0 10 564
1 ACCEPTED SOLUTION

Should be:

Select(StatusApp[Po Customer],IN([PO nr.],[_thisrow].[PO number]))

View solution in original post

10 REPLIES 10

Hello @Pavel, welcome to the Appsheet community !

Is the [Column A] of your โ€œTable2โ€ the label for that table? if thatโ€™s the case you could switch to a EnumList with base type REF for your form linked to the table 1, that would save the ID for each row selected instead of just whatever name is in your [Column A].

Once you have a list of IDโ€™s, you just need to filter Table2[Column B] using that list, for that you could use something like:

SELECT(Table2[Column B],CONTAINS([_THISROW].[EnumList Column],[ID Column]))

Iโ€™d rather use IDโ€™s to search on your Table2 because names and values can be repeated, but IDโ€™s should never repeat.

Should be:

IN([ID Column], [_THISROW].[EnumList Column])

See also:

Thanks Steve, i tend to mix those two when dealing with lists hehe

When dealing with EnumList โ€”> IN(), since it is an EnumLIST

For partial lookups for search functions using text โ€”> CONTAINS()

Is that correct?

Yep!

Pavel1
New Member

Thank you Rafael and Steve! Appreciate it very much

Not yet working for me, but I believe I didnโ€™t write syntax correct.

Here is how it looks now. I need to populate field called Customer Ref with selected values from Column PO Customer in table StatusApp, where values are equal to the values in the EnumList in the form.

Select(StatusApp[Po Customer],IN(StatusApp[PO nr.],[_thisrow].[PO number]))

PO number is a EnumList with suggested values = StatusApp[Po nr.]

Here is a snapshot of columns in table StatusApp
(in next message - can add only one media)

Iโ€™ve tried to do the EnumList based on references from StatusApp but it didnโ€™t work out for some reason (there were no values available, empty). So now Iโ€™m back to EnumList based on Text and Suggested values
(in next message)

Should be:

Select(StatusApp[Po Customer],IN([PO nr.],[_thisrow].[PO number]))

Pavel1
New Member

Pavel1
New Member

Pavel1
New Member

Thank you very much Steve! Last quick question: any chance I get only unique values and remove duplicates?

Top Labels in this Space