cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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
Rebetcha
MVP

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

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?

Anonymous
Not applicable

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)
v-sheyu-msft
Community Support
Community Support

Hi @Anonymous,

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.

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.
Anonymous
Not applicable

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?

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

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

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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

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

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,156)