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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,899)