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 Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,358)