web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / SharePoint list with a...
Power Apps
Unanswered

SharePoint list with a column containing sublist to controls in gallery

(0) ShareShare
ReportReport
Posted on by

I have created a Gallery in a PowerApps Canvas that contains, a Label control a Radio control, a Checkbox control, and a Textbox control.

I also have a SharePoint list with column/data structure as below:

RowIDQuestionType_ContainerType_subListType_Display
1q1Radioa;b;cTRUE
2q2RadioI.;II.;III.FALSE

3

q3Text TRUE
4q4Checkx;y;zTRUE
5q5  FALSE


I want to set up the Gallery so that shows the items where Type_Display = TRUE (which I know how to do)
AND where RowID = 'var_X'
AND if a Question is visible, fill the Type_Container with items in the Type_subList.

For example if 'var_X' = 1, then the Gallery LabelContainer.Text="q1" and RadioContainer.Visible=True and the RadioContainer.Items = {a;b;c} (so 3 radio choices of 'a' or 'b' or 'c')

 

if 'var_X' = 4, then the Gallery LabelContainer.Text="q4" and CheckContainer.Visible=True and the CheckContainer.Items = {x;y;z} (so 3 radio choices of 'x' or 'y' or 'z')

I feel like i can mostly get it, but the last bit of adding the List_subList to the containers is tripping me up. That column in my SharePoint is formated as a multiple choice with the option to add values that are not already in the choice list...

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    Hi @Anonymous ,

    To summarize all of this, you require a Radio control have different options depending on the value of another control.

    I will firstly say I have had issues int he past doing this with drop-downs and getting a reliable result, however the path you need to follow is the Items of the Radio Control and set them with an If statement. I have just successfully made a test with two alternative Choices column.

    Have a go on this basis and I am happy to help you with the syntax.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • Community Power Platform Member Profile Picture
    on at

    Hey @WarrenBelz
    Thanks for offering to help. Your summery is not quite what I want...but close.  I worked on it on my own based on what you said and I think that i am most of the way there.
    I created a Gallery and the Gallery.Items = Filter(_collAllShoutOuts, col_Type.Value <> "Shoutout", col_Display = true, col_Parent_Type in Filter(_collAllShoutOuts,col_Selected = true).col_Shoutout_Type).
    Then, within that Gallery I created a Radio, Listbox, ComboBox, TextInput, etc. and for each of the Controls I make the .Visible = If("Radio" = ThisItem.col_Container.Value,true,false)  - I change the text for each type of control.
    and I make all the Controls.Items = ThisItem.col_SubItems

    This means that when i have a "Parent type" selected all of the Children (additional details questions) show up in the gallery 1-by-1.

    But I have a TextInput AND a Radio control associated with a single parent type and I want both of those controls to show up at the same time rather than step-by-step in the nav of the Gallery.  

    Is the solution to make another sub-gallery that holds each Parent or something else?

     

    I have attached a picture of the structure so far

  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    Thanks @Anonymous ,

    What is your data source type here?

  • Community Power Platform Member Profile Picture
    on at

    the source is ultimately derived from a SharePoint table.  I pull that table into a Collection in the OnAppStart and only use the collection from there on so that other departments will be able to manage/maintain their own copies in the future. 

    I have attached a copy of the table below. 'col_SubItems' is multi-select that allows custom input, 'col_Type' and 'col_Container' are choice type columns, I think the others are fairly self-explanitory...

     

    And, yes, I know that this would be WAY easier if there were two tables not 1, but for reasons that I will not go into here, I need to use a single table.

     

    Questioncol_Typecol_Shoutout_Typecol_Descriptioncol_Shoutout_Colorcol_Inactive_Iconcol_Active_Iconcol_Displaycol_Selectablecol_Selectedcol_Parent_Typecol_Containercol_SubItems
    3ShoutoutYOCA (Yearly Outstanding Contribution Award)Reserved for outstanding contributions.#7DA7D9  TRUETRUEFALSE   
    2ShoutoutNOTT (Night On The Town)A monetary award for a night on the town on DuPont.#F69679  TRUETRUEFALSE   
    1ShoutouteThankYouYour message will be posted to the CAS Yammer page for all to see.#2E3192  TRUETRUEFALSE   
    4ShoutoutComplimentary small group lunchOff site lunch with a few friends#F26D7D  TRUETRUEFALSE   
    5ShoutoutRecognition at the next CoreAS Town HallA true ShoutOut as it were.#DBA103  TRUETRUEFALSE   
    6ShoutoutNomination for external awardExternal awards are pretty awesome.#00BFF3  TRUETRUEFALSE   
    7ShoutoutMerchandiseWe could all use more stuff.#82CA9C  TRUETRUEFALSE   
    8ShoutoutGift CardDid someone say Gift Card?#A0410D  TRUETRUEFALSE   
    9ShoutoutOtherYou tell us what the right award is.#F49AC1  TRUETRUEFALSE   
    10ShoutoutTypeOfAwesomeWhich type of Awesome are you nominating?#F300AA  FALSEFALSETRUE   
    11sub_Shoutout Which type of Awesome are you nominating?   TRUEFALSEFALSETypeOfAwesomeRadioOutstanding Effort toward Organizational Activities;#Successful Completion of a Business-Critical Rush Job;#Participation in Poster Session or Seminar;#Other;#Excellence in Safety;#Outstanding Technical Contribution to a Project or Team
    12sub_Shoutout When you say 'Other', what exactly do you mean?   TRUEFALSEFALSETypeOfAwesomeText 
    13sub_Shoutout Please choose most appropriate YOCA   TRUEFALSEFALSEYOCA (Yearly Outstanding Contribution Award)RadioExcellent Innovation in Science;#Excellence in Mentorship;#Community Support Award;#Excellent Innovation in Technology;#Outstanding Safety Contributions;#Collaboration Award
    14sub_Shoutout amount?   TRUEFALSEFALSENOTT (Night On The Town)Text 
    15sub_Shoutout Personal thank you message   FALSEFALSEFALSEeThankYou  
    16sub_Shoutout     FALSEFALSEFALSEOtherText 
  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    Thanks @Anonymous ,

    So that I can get my mind around your current requirements (this thread has been going for a while and has had some changes), can you please send a screenshot of what you have now and in a couple of sentences summarise what you want to happen.

  • Community Power Platform Member Profile Picture
    on at

    Sure @WarrenBelz, and thanks for taking the time to help.
    Background needs are as follows, I need to take the MS Template Shoutout app and:

    1. Modify it so that multiple Shutouts Types can be selected and sent to a person at 1 time
    2. I need to be able to ask Additional Questions of the person filling the form depending on what Shoutout Types they are selecting
    3. This maintenance of these Types and Addition Questions all has to be done through a SharePoint Table
    4. The Shoutouts that are created will get input into another SharePoint table for leadership to deal with

    Where I have gotten to:

    1. I Have successfully imported the SharePoint table into the app
    2. I have implemented the multi-select on Shoutout Types (using the 'col_selected' column in collection)
    3. I have a horizontal Gallery to ask the Additional Questions

    Where I am failing:

    1. My current Additional Questions Gallery only cycles through each question 1-at-a-time. I want to nest a second, vertical, gallery inside the first so that if I have 'n' Additional Questions for a particular Shoutout Type, they all show up in the same vertical gallery space
    2. I am having trouble getting the multi-selected Shoutout Types to display in the ActivityFeed and Person Screens (but I will make a separate post for that)

    Additional details:

    1. My 1st level, horizontal gallery's Items:
       .Items = Filter(_collAllShoutOuts, col_Type.Value <> "Shoutout", col_Display = true, col_Parent_Type in Filter(_collAllShoutOuts,col_Selected = true).col_Shoutout_Type)
    2. The RadioControl inside the 1st level, horizontal gallery is set to (and this works, but is not really what I want):
      .Items = ThisItem.col_SubItems 
    3. My 2nd level, vertical gallery's Items (this does not work):
      ThisItem.Type
    4. The RadioContol inside the 2nd level, vertical gallery is set to (also does not work):
      .Items = ThisItem.col_subItems 

     

  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    @Anonymous ,

    I will get back to you on this - may be several hours.

  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    Hi @Anonymous ,

    Sorry for the late reply. I have read this a couple of times to try and get my mind around your sub-gallery requirements. Are these items on the same list or a separate list and if so, how are they linked to the main item. If the same list, why do you want a sub-gallery? Would it not be easier to simply control their visibility based on the items chosen in the other fields?

  • Community Power Platform Member Profile Picture
    on at

    Hey @WarrenBelz ,

    This all comes from 1 list. Let's do a walk-through example. Take a look at the table I posted while reading below and it will hopefully make sense.
    Process:

    1. User logs into the Shoutouts app and picks a coworker to do a shoutout for
    2. The user selects the desired shoutouts from the gallery on the SelectShoutout Screen
      1. The items for this gallery is .Items = Sort(Filter(_collAllShoutOuts, col_Display = true, col_Type.Value = "Shoutout"), ID)
      2. Let's say that the user selects "TypeOfAwesome", "YOCA", and "eThankYou"
      3. The user then taps the next button
    3. The Next button brings the user to the Compose Message Screen (where we have a personal message Text Input AND the Nested Galleries of AddtionalDetails)
      1. user fills out personal message
      2. user needs to fill out all additional questions based on the currently selected shoutout types (which in this case are: "TypeOfAwesome", "YOCA", and "eThankYou")
      3. So the AddtionalDetails Gallery filters items from the list as follows: .Items = Filter(_collAllShoutOuts, col_Type.Value <> "Shoutout", col_Display = true, col_Parent_Type in Filter(_collAllShoutOuts,col_Selected = true).col_Shoutout_Type)
        1. This takes any item from the list that has a value in the col_Parent_Type column equal to that of one of the selected Shoutout Types
        2. Up to this point I have everything working. It is from here that I want to modify
      4. The users SHOULD see:
        1. A heading in the AdditionalDetails Gallery that says "TypeOfAwesome"
        2. They should also see the text from col_Description for the "TypeOfAwesome" Shoutout (which is "Which type of Awesome are you nominating?")
        3. There should be navigation buttons so that they can go to the next Shoutout Type (which is "YOCA" in this case)
        4.  Finally they should see a sub gallery inside the AdditionalDetails Gallery that contains the Items from the list where col_Parent_Type = TypeOfAwesome
          1. in this case, there should be a RadioControl asking "Which type of Awesome are you nominating?" (coming from col_Description) and having the items listed in the col_SubItems column
          2. there should also be a TextInput Control that has a prompt of "When you say 'Other', what exactly do you mean?" (again coming from col_Description)
      5. The user fills out the details for this Shoutout Type and then hit the right arrow (nav arrow) in the AdditionalDetails Gallery to go to the next set of questions for the selected Shoutout Types
      6. The next Shoutout type is "YOCA" and they should see:
        1. A heading in the AdditionalDetails Gallery that says "YOCA (Yearly Outstanding Contribution Award)"
        2. They should also see the text from col_Description for the "YOCA..." Shoutout (which is "Reserved for outstanding contributions.")
        3. There should not be any more navigation buttons since the next selected Shoutout Type (which is "eThankYou" in this case) does has a child item (item 15 from the Question column) BUT the col_Display is set to FALSE.
        4.  Finally they should see a sub gallery inside the AdditionalDetails Gallery that contains the Items from the list where col_Parent_Type = "YOCA (Yearly Outstanding Contribution Award)"
          1. in this case, there should be a RadioControl asking "Please choose most appropriate YOCA" (coming from col_Description) and having the items listed in the col_SubItems column
      7. Once all the AdditionalDetails Gallery items are filled out the screens Next button will be enabled and they can continue to the confirmation page.

    Now in this example we had the sub gallery holding a RadioControl and TextInput control for the "TypeOfAwesome" Shoutout Type, we can conceivably program these to show up without using a sub gallery - BUT, there are possible cases where a Shoutout Type could have more that one required RadioControl, and in that case we definitely need the sub gallery to make this work.

     

    I know that this is long and I hope it makes a little more sense. It really is not that difficult to envision, but it is a bear to put into words.

     

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    OK. I have found a workaround solution that seems to give the visual behavior that I want. It relies on filtering the table again based on a text in an outer gallery which seems like a bit of a hack, so I am still looking for a more complete solution, but it is a start.

    I make my outer gallery have:

    1. A Label, called Label_SOType, with .Text =  ThisItem.col_Shoutout_Type
    2. An inner/nested Gallery with .Items = Filter(_collAllShoutOuts, col_Parent_Type = Label_SOType.Text, col_Display = true)

    I then set the Outer Gallery's .Items = Filter(_collAllShoutOuts, col_Type.Value = "Shoutout", col_Selected = true, col_Shoutout_Type in Filter(_collAllShoutOuts, col_Type.Value <> "Shoutout", col_Display = true).col_Parent_Type)

     

    Then the inner gallery gets one of each of the controls (Radio, TextInput, Combo, ect.) and these controls get:

    1. .Items = ThisItem.col_SubItems
    2. .Visible = If(Upper("X") = Upper(ThisItem.col_Container.Value),true,false)  [where X is the type of control, so a radio control gets "Radio" to match the keys in col_Container]
    3. .Y = 0 (so all the controls sit on top of each other to help prevent gaps between questions)
    4. IF using a VariableHeight Gallery for inner/nested gallery set .Height = If(Upper("X") = Upper(ThisItem.col_Container.Value),Parent.Height - HtmlText_DescriptionQuestion.Height,0) 

     

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard