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.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (4,481)