cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

Dropdown selection produces TextInput box for user (depending on the selection)

I have a dropdown list (Dropdown4) that pulls it's data from a user's selection from a ComboBox, which in turn pulls it's data from a SharePoint List with over 100 entries.

 

Example, I choose 3 selections from the ComboBox.

 

This then populates my Dropdown4 with those 3 selections:

 

Selection 1
Selection 2
Selection 3

 

What I would like to do now, is when I select an option from DropDown4, I would like a TextInput Box (TextInput1) to be appear and a numerical value entered by a user.

 

I would like a new TextInput Box to appear for each option in Dropdown4.

 

For example: I choose 'Selection 1 a TextInput Box appears and I enter the number 15 I then choose 'Selection 2' a new TextInput Box appears and I enter the number 25 When I go back to 'Selection 1' I would like the number I chose for that selection (15) to remain, and vice versa.

 

My trouble is, with the amount of records in my SharePointList (Selection 1 - 100), in my ComboBox I can choose any permutation, for example, Selections 1 5 and 72.

 

How do I link up my TextInput Boxes with the corresponding selection number?

 

The only way I can think is by using the SharePoint list record's ID., Then using the Visible field on the TextInput Box to only display when the Dropdown4.Value.ID=*that section's ID number* Is there a much easier way to do this?

9 REPLIES 9
Highlighted

Can you please add some screenshots? Your scenario is hard to follow with just text. Thank you.
Highlighted

I have a dropdown list (Dropdown4) that pulls it's data from a user's selection from a ComboBox, which in turn pulls it's data from a SharePoint List with over 100 entries.

 

(Image 1)

 

Example, I choose 3 selections from the ComboBox.

 

(Image 2)

 

This then populates my Dropdown4 with those 3 selections:

 

Selection 1
Selection 6
Selection 8

 

(Image 3)

 

What I would like to do now, is when I select an option from DropDown4, I would like a TextInput Box (TextInput1) to be appear and a numerical value entered by a user.

 

(Image 4)

 

I would like a new TextInput Box to appear for each option in Dropdown4.

 

For example: I choose 'Selection 1 a TextInput Box appears and I enter the number 15 I then choose 'Selection 2' a new TextInput Box appears and I enter the number 25 When I go back to 'Selection 1' I would like the number I chose for that selection (15) to remain, and vice versa.

 

(Image 5 and Image 6)

 

My trouble is, with the amount of records in my SharePointList (Selection 1 - 100), in my ComboBox I can choose any permutation, for example, Selections 1 5 and 72.

 

How do I link up my TextInput Boxes with the corresponding selection number?

 

The only way I can think is by using the SharePoint list record's ID., Then using the Visible field on the TextInput Box to only display when the Dropdown4.Value.ID=*that section's ID number* Is there a much easier way to do this?

Highlighted

Or to simplify it completely, for the amount of items I have in my dropdown, thats the amount of text boxes I want to appear. So if there are 3 items in the dropdown I want 3 different text boxes to appear. If there are 12 items in the dropdown I want 12 different text boxes to appear (and so on)
Highlighted
Community Support
Community Support

Hi @jpacettf,

Can you share a bit more about your issue ?

Can you show the structure of the sharepoint list ?

Do you want to create a new textinput box dynamically ?

 

Currently ,PowerApps does not support to create a new textinput box dynamically.

I agree with your way and there's no better way on my side.

 

I made a test.

8.PNG

 

set Items property of Dropdown1  to :

ComboBox1.SelectedItems

set Visible property of the TextInput control to :

If(Dropdown1.Selected.ID=3,true,false)

Regards,

Eason

 

Community Support Team _ Eason YU
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted

Hi jpacettf, For some reason I am unable to download the attachment with the screen shots but I think I have an idea what you are trying to accomplish. As a rule when you have some sort of set up or layout that you want to repeat but the number of repetitions is variable - use the gallery. That is what I recommend in this case. Add a gallery with a text input box in the template and use the same data source input for the gallery as you use for your drop down. You will then get a text input for every item in the drop down.
Highlighted

I've used a Gallery and Collection and it works great! Only thing I need to work out now is how to save the information in my Gallery back to my datasource? Any Ideas?

Highlighted

Use Patch with ForAll combined on the Gallery.AllItems.<text value of text box> to update your data source.
Highlighted

I have tried a lot of different variations with Patch, but I always end up with an error. The columns in my Collection were different to the Columns in my Data Source so I rectified that but then it is still coming up with "Unknown Error" (which is helpful!) Could you possibly show me the formula you are using and on what field (Items, Default?) Many Thanks
Highlighted

Have a look at this thread.: https://powerusers.microsoft.com/t5/General-Discussion/Access-gallery-item-in-ForAll-loop/td-p/10138... It discusses how to loop through all items of a gallery and update the datasource with the text value of a text box. It uses UpdatIf instead of Patch.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,932)