Is the a way to use Fomulamap in another Formulamap and use different CurrentValues?

So here is the case:

I have a form that has 3 fields: Text, MultiSelect1, and MultiSelect2.

I would like to add a row to a table for each combination possible.

For example, if the user selected MS1 - 3 options, and MS2 - 2 options, I want to add 6 rows using 1 button click:
Text, MS1.Value1, MS2.Value1
Text, MS1.Value2, MS2.Value1
Text, MS1.Value3, MS2.Value1
Text, MS1.Value1, MS2.Value2
Text, MS1.Value2, MS2.Value2
Text, MS1.Value3, MS2.Value2

I tried FomulaMap(MS1, FormulaMap( MS2, AddRows(Table, Column1, Text, Column2, CurrentValue…
And then I realized that there is only one CurrentValue and I can’t refer to the other one inside inner FormulaMap.

Is there a proper way to do this or I need to use a different solution (which I found knowing that MS1 has static 2 values, so I could use an IF() for that?

1 Like

hi @Artem_F , welcome.

Yes you can via WithName()

@Federico_Stefanato is a great fan of this approach, examples he provided using WithName() are:

best, christiaan

Thanks, i hoped i could find some posts myself, but i guess i was using wrong search terms :slight_smile: