cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
thatonechick10
Frequent Visitor

Using Gallery to write Multiple Options on Form (instead of combobox?)

Hello,

 

I'm new to using PowerApps and I am currently struggling to find a way to make this work. I've looked through several articles but haven't had anything get me in the right direction other than using a gallery.

 

"Help me Obi-wan Kenobi, you're my only hope"

 

I am creating a form but would like to use Images in place of the drop down combo box to select multiple choices. 

 

Example:

In App: User enters First Name, Last Name, Email, Phone Number, and then selects one or all options on the choice card. 1-2-3

 

powerapps-backend.JPG

 

On SharePoint List: Data get entered into First Name, Last Name, Email, Phone Number, and then shows which of the three choices in the Choices column that were selected by user.

 

SPL-backend.JPG

 

Hopefully this all makes sense and SOMEONE out there can help me!!

 

*****EDIT****

 

What I do NOT want is for the images to be uploaded to the SharePoint list. If there is a way to assign each image a value to pass to the Choices column, that is the end goal. 

Images = text value (or whatever value the Choices column takes)

 

1 ACCEPTED SOLUTION

Accepted Solutions

Here is an example. In my button to load my form I put

ClearCollect(formOptions, {Value:"Option 1", ImgVal: wo1},{Value:"Option 2", ImgVal: wo2});
NewForm(Form3);
Clear(valPass)

 

This loads me a form, in new mode, and also makes a collection with two options, each with an associated image

 

My form has 2 datacards for this example, venue & area.

My area card is a choice column

I deleted its default control in the card and placed a gallery like so

TheRobRush_0-1677001629791.png

I gave that gallery the Items of formOptions, and it's gallery name is Gallery2_1

the image control in your gallery will have the onselect of

If(
     ThisItem.Value in valPass, 
            RemoveIf(valPass, Value=ThisItem.Value),
            Collect(valPass, ThisItem.Value)
)

The Update property of my Area datacard is now

valPass

 

if youd like a visual indicator of what has been selected and what has not you can also in your gallery include at top level a square icon that fills the template space and is a color of your choosing with like .1 for the opacity, give it the same onselect i provided for the img, and a visible status of

ThisItem.Value in valPass

 

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

View solution in original post

14 REPLIES 14

Here is an example. In my button to load my form I put

ClearCollect(formOptions, {Value:"Option 1", ImgVal: wo1},{Value:"Option 2", ImgVal: wo2});
NewForm(Form3);
Clear(valPass)

 

This loads me a form, in new mode, and also makes a collection with two options, each with an associated image

 

My form has 2 datacards for this example, venue & area.

My area card is a choice column

I deleted its default control in the card and placed a gallery like so

TheRobRush_0-1677001629791.png

I gave that gallery the Items of formOptions, and it's gallery name is Gallery2_1

the image control in your gallery will have the onselect of

If(
     ThisItem.Value in valPass, 
            RemoveIf(valPass, Value=ThisItem.Value),
            Collect(valPass, ThisItem.Value)
)

The Update property of my Area datacard is now

valPass

 

if youd like a visual indicator of what has been selected and what has not you can also in your gallery include at top level a square icon that fills the template space and is a color of your choosing with like .1 for the opacity, give it the same onselect i provided for the img, and a visible status of

ThisItem.Value in valPass

 

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

Thank you so much for your reply!

 

I'm trying to work through the message above and I'm running into two errors so far. 

I have gone ahead and taken a screen shot of how everything is looking so far and the errors I was given. 

thatonechick10_0-1677009144159.png

 

When I load the gallery into my 'Choices_DataCard2', do I select the SPL as my data source? 

I also am not receiving 3 images in the gallery for the 3 options in my 'Choices' column. 

 

I appreciate your time and you being as detailed as possible.

On my lunch so will look closer after. But to start with in your onstart you just copied my ClearCollect() exactly. You needed to change that.  Should be Value: name of first option, img: name of first image and so on.

 

Also your gallery control in the form needs to be set to have the items property of this collection we made formOptions. The screenshot you sent has an image in it so it cant be set to the right source data yet since your collection in the onstart hasnt been set up right yet.

 

The forms datasource will be your list, the gallery will be formOptions

 

The data card the gallery in will have update property of valPass.

 

On my phone so just typing what i see off hand. Reply if more needed

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

Ok so I am back, iin this screenshot this buttons onselect is what you made your app onstart, if your form loads just by app starting thats fine keep it there, otherwise move to whatever button opens your form

TheRobRush_0-1677010887733.png

So in this image we have a COllection format of

{Value: "Word for Option", ImgVal: the image name of image you uploaded that you want to be representative of this option}

Now the imgVal hyou can name anythign you want, but the fuirst part of that Value: must be named value (because sharepoint choice columns are tables they work in a {Value:}, {Value:} format and this makes the amount of conversions we have to do as few as possible.

 

the GALLERY in your form needs the items property formOptions (the name of the collection we made) the image control in the gallery will be ThisItem.ImgVal (or whatever name you chose) the datacard that you store this gallery in will then have the Update property valPass, which because of how we set everything we set up is already a table in exact format that your choice column expects to see

 

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

I apologize for the back and forth messaging I have done the steps mentioned above but I'm still not receiving the data output to the sharepoint list. I still takes, first name, last name, email, phone. but is not picking up anything for the choices column. 

thatonechick10_0-1677014785839.png

I'm not sure if the issue has anything to do with my submit button set up or not.

I have it set as OnSelect > SubmitForm(Form1)

 

thatonechick10_1-1677015079395.png

 

click this

TheRobRush_0-1677015018110.png

then send a screenshot of what you have in its Update property

 

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

thatonechick10_0-1677015144987.png

 

ok that's not behaving correctly, one of two liekly culprits. one lets see the onstart again now that its chanegd to make sure format looks right still.

 

then also click one of your images and then goto your collections, and send me an image of what the valPass collection looks liek so we can make sure thats beign made correctly,

 

if both those are good ill tell you next step

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

OnStart:

thatonechick10_0-1677015494493.png

Should 'ImgVal' be set to a different name individually for each option? Like 'Choice1' and 'Choice2'?

So this is only showing me one image is loaded into the gallery via the drop down for Gallery2. but some how both images are loaded in visually? 

thatonechick10_1-1677015666428.png

 

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!   This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions in the Forums to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Community MembersNumber of SolutionsSuper UsersNumber of Solutions @anandm08  23 @WarrenBelz  31 @DBO_DV  10 @Amik  19 AmínAA 6 @mmbr1606  12 @rzuber  4 @happyume  7 @Giraldoj  3@ANB 6 (tie)   @SpongYe  6 (tie)     Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Community MembersSolutionsSuper UsersSolutions @anandm08  10@WarrenBelz 25 @DBO_DV  6@mmbr1606 14 @AmínAA 4 @Amik  12 @royg  3 @ANB  10 @AllanDeCastro  2 @SunilPashikanti  5 @Michaelfp  2 @FLMike  5 @eduardo_izzo  2   Meekou 2   @rzuber  2   @Velegandla  2     @PowerPlatform-P  2   @Micaiah  2     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Week 3:Community MembersSolutionsSuper UsersSolutionsPower Apps anandm0861WarrenBelz86DBO_DV25Amik66Michaelfp13mmbr160647Giraldoj13FLMike31AmínAA13SpongYe27     Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Week 4:Community MembersSolutionsSuper UsersSolutionsPower Apps DBO-DV21WarranBelz26Giraldoj7mmbr160618Muzammmil_0695067Amik14samfawzi_acml6FLMike12tzuber6ANB8   SunilPashikanti8

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (886)