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

Gallery editing

Hi everyone, I hope you're all doing good. 

 

I've listed several PCs in a SharePoint list. Some of them share the same reference, image and group, but not the same specs or prices. For example, I put the Dell 5300 in two different lines, the first one with 8GB of RAM and a 256GB Hard Drive, and the second with 16GB of RAM and a 512GB Hard Drive. 

I want my gallery to only show the product once, and then make the users choose the specs in a DropDown list, which will update the Price section automatically.

 

Is there a formula to make this happen ?

 

I hope it was clear, and I apologize for my English.

Thank you in advance for your time. 

 

Arman

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Hey @ArmanShafiee 

 

You can show items once in a gallery using the Distinct() function. In the Items property of your gallery, use a formula like this:

Distinct(CustomGallerySample,SampleHeading)

Where CustomGallerySample would be the name of your SharePoint list and SampleHeading would be the column your computer names are stored.

Then, in the gallery, you can add a dropdown and use this to set the values of the dropdown in the Items property

Filter(CustomGallerySample,SampleHeading=ThisItem.Result).SampleText

Again, CustomGallerySample would be the name of your SharePoint list and SampleHeading would be the column your computer  name is stored, and SampleText would be the specs you want in that dropdown.

You can also make the dropdowns depend on each other so someone can't select an invalid combination of specs. You can do that using another filter or the "Depends On" property in the property pane on the right side of the screen when you've selected your dropdown.

View solution in original post

Community Support
Community Support

Hi @ArmanShafiee ,

 

Of course, we can get it with the following steps. I assume the column names are PCName, RAM, Price.

1. Add a Gallery, set Items property: Distinct( 'SP list', PCName), then the gallery will show the PC Names that are not repeated.

2. Add a dropdown into the gallery, set Items property: Filter('SP List', PCName=ThisItem.Result).RAM, select corresponding specs.

3. Add a Label into Gallery, Set Text property:   LookUp('SP list',PCName=ThisItem.Result &&  RAM=Dropdown1.Selected.RAM).Price , it will show the corresponding price.

Snipaste_2020-01-01_15-21-54.pngSnipaste_2020-01-01_15-22-16.png

Sik

 

 

View solution in original post

3 REPLIES 3
Super User
Super User

Hey @ArmanShafiee 

 

You can show items once in a gallery using the Distinct() function. In the Items property of your gallery, use a formula like this:

Distinct(CustomGallerySample,SampleHeading)

Where CustomGallerySample would be the name of your SharePoint list and SampleHeading would be the column your computer names are stored.

Then, in the gallery, you can add a dropdown and use this to set the values of the dropdown in the Items property

Filter(CustomGallerySample,SampleHeading=ThisItem.Result).SampleText

Again, CustomGallerySample would be the name of your SharePoint list and SampleHeading would be the column your computer  name is stored, and SampleText would be the specs you want in that dropdown.

You can also make the dropdowns depend on each other so someone can't select an invalid combination of specs. You can do that using another filter or the "Depends On" property in the property pane on the right side of the screen when you've selected your dropdown.

View solution in original post

Community Support
Community Support

Hi @ArmanShafiee ,

 

Of course, we can get it with the following steps. I assume the column names are PCName, RAM, Price.

1. Add a Gallery, set Items property: Distinct( 'SP list', PCName), then the gallery will show the PC Names that are not repeated.

2. Add a dropdown into the gallery, set Items property: Filter('SP List', PCName=ThisItem.Result).RAM, select corresponding specs.

3. Add a Label into Gallery, Set Text property:   LookUp('SP list',PCName=ThisItem.Result &&  RAM=Dropdown1.Selected.RAM).Price , it will show the corresponding price.

Snipaste_2020-01-01_15-21-54.pngSnipaste_2020-01-01_15-22-16.png

Sik

 

 

View solution in original post

Thank you so much for your help @EricLott @v-siky-msft 
Both of your solutions are functionning.

Happy 2020 !

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (45,176)