cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
HubertWiech
Regular Visitor

Create a table from two textinput fields with several values.

 

Hi everyone,

I struggle a bit with creating a collection.

 

We pull out data from our construction software and want to paste the values into textinput fields.

Textinput field 1: (project numbers) 1-∞ Values: 19212-1;19212-2…(the amount of values can variate)

 

TextInput field 2: (Module names) 1-∞ Values: YV-111;YV-112;YV-113…  (the amount of values can variate)

 

From that 2 Textinput fields I want to create a new table like this:

 

Projektnumber                           Modulenames

19212-1                                          YV-111

19212-1                                          YV-112

19212-1                                          YV-113

19212-2                                          YV-112              

19212-2                                          YV-113

19212-2                                          YV-114

…                                                       …                         

 

ClearCollect(collectEKYV;AddColumns(Split(TextInput2.Text;";");"Modulenames";Result;"Projektnumber ";TextInput1.Text))

 

Thanks for your help.

1 ACCEPTED SOLUTION

Accepted Solutions
HubertWiech
Regular Visitor

I managed to come up with a solution by myself:

Don’t know whether it’s the best way to do it but it works for me.

 

Clear(coll1);;
ForAll(Split(TextInput1.Text;";");Collect(coll1;{Projektnummer:Result;Elementnamn:Split(TextInput2.Text;";")}));;
ClearCollect(coll2;Ungroup(coll1;"Elementnamn"))

 

/Hubert

View solution in original post

2 REPLIES 2
HubertWiech
Regular Visitor

I have to add with this funktion: 

ClearCollect(collectEKYV;AddColumns(Split(TextInput2.Text;";");"Modulenames";Result;"Projektnumber ";TextInput1.Text))

I only can make it working with one value in "TextInput1" not several. 

HubertWiech
Regular Visitor

I managed to come up with a solution by myself:

Don’t know whether it’s the best way to do it but it works for me.

 

Clear(coll1);;
ForAll(Split(TextInput1.Text;";");Collect(coll1;{Projektnummer:Result;Elementnamn:Split(TextInput2.Text;";")}));;
ClearCollect(coll2;Ungroup(coll1;"Elementnamn"))

 

/Hubert

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (1,559)