Table (query) column into array

Hi.

I have two tables. One is table of Products in which ID column contains SKUs (unique). Another
table ProductsLines contains production line codes and SKUs and represent on which production line SKU can be produced. I have three columns is this table - ID, SKU, ProductionLineId. SKU and ProductionLineId are not unique (SKU can be produced on multiple production lines)

I can display filtered ProductsLines data based on selected SKU and ProductionLineType (starts with condition on ProductionLineId) on interactive table showing only ProductionLineId column.

For simplicity and optimized usage of screen space I would like to display ProductionLineId in comma separated value like Line1, Line3, Line4.

I would like to fill array with filtered ProductionLineId column (this is where I got stuck) and then use
Array join to string and store result into variable which is displayed to user on screen.

Thanks,
Ermin

hello @ermingut, apologies for the delayed response.

you could add the ProductionLineID column to an Array using the Array > Push Onto Array function. however, this will require for each of the Records to get loaded into the Placeholder:


will this work for you or would you like for the Array to get populated on Step Open without having to select the individual Records??

Hi @gio.

Thank you for your answer.

Unfortunately any solution based on individual table record is not ok for me (load each record in placeholder - if understand this correctly - I don’t know at design which ProductionLineID will be in filtered table when SKU is selected).

Loading table(query) column into Array has multiple implications for me like:

  • Dynamically created dropdown (menu) widget on page
  • Query by array (another topic)
  • Using dynamically created array in various scenarios

This kind of functionality would give me freedom over data in various cases.

Thanks.
Ermin

hello @ermingut, thanks for the update!!

are you aware of using the Table API?? by connecting the Table API to your own instance, you should be able to build what you’re describing. here’s a guide of how to use it to populate data from a Table into a Single Select for example: Table records in a select option - #4 by gio.

let me know if this helps!!

1 Like

Thank you for the link.

I think I will have to look into Table API.

1 Like