Hi Folks,
I am new to powerapps and wanted to create an powerapp. I have few images in the sharepoint document libraries.
I am trying to create app which will display images from this document library one by one and want have option to rate the images from(1-5).
This app will be shared with around 30 people who will rate the images.
So finally I should get average rating for all images based on the ratings given by all users.
Solved! Go to Solution.
Hi @rajp ,
Where do you store your rating record?
Do you want to create a Rating app using PowerApps to rate the each image in your SP Library?
Based on the needs that you mentioned, I think PowerApps could achieve your needs. Firstly, you need to create a data source (e.g. a SP List) to store the rating record your end users rate for your images.
On your side, you could consider add a SP list data source to store the Rating record your end users rate for your images. The data steucture of your SP list may look like below:
Then you could configure your app as below:
Add a Gallery control within your app, set the Items property of the Gallery to your SP Library.
Within the Gallery, add a Image control, set the Image property to following:
ThisItem.'Link to item'
Add a Rating control within your Gallery, set the Default property to 0, set the Max property to 5.
Outside the Gallery, add a Button control (called "Save") at the bottom, set the OnSelect property to following:
ForAll( /* <-- Save Rating records into your SP list */ Gallery1.AllItems, Patch( 'YourSPList', Defaults('YourSPList'), { Title: "Rating Image App - " & Now(), PictureName: 'File name with extension', RatingValue: Rating1.Value } ) )
Then if you want to get the average rating for each Image file in your SP Library, you could take a try with the following formula:
Average( Filter('YourSPList', PictureName = "A specific image file name"), RatingValue )
If you share your app with other users in your Org, when they run this app, they may not see these images within the Gallery. It is an known issue with images stored in SP Library that pictures that need authentication on SharePoint are not supported yet within PowerApps when running an app in Mobile device or other users run this shared app.
Please check my response within the following threads:
As an alternative solution, you could consider create another SP list data source (not the above SP List to store your Rating records), and a Hyperlink column (Format url as Hyperlink) within it. Then copy URL link of the image files in your SP library, create corresponding record within your SP list and put the copied URL link within the Hyperlink column.
Within your app, use above new created SP list as data source instead of your SP Library, to display the images files within your Gallery.
As another solution, you could consider display thumbnail images of your Image files stored in your SP Library within your app. Please check and see if the following blog would help in your scenario:
Please take a try with above solution, then check if the issue is solved.
Best regards,
Hi @rajp ,
Where do you store your rating record?
Do you want to create a Rating app using PowerApps to rate the each image in your SP Library?
Based on the needs that you mentioned, I think PowerApps could achieve your needs. Firstly, you need to create a data source (e.g. a SP List) to store the rating record your end users rate for your images.
On your side, you could consider add a SP list data source to store the Rating record your end users rate for your images. The data steucture of your SP list may look like below:
Then you could configure your app as below:
Add a Gallery control within your app, set the Items property of the Gallery to your SP Library.
Within the Gallery, add a Image control, set the Image property to following:
ThisItem.'Link to item'
Add a Rating control within your Gallery, set the Default property to 0, set the Max property to 5.
Outside the Gallery, add a Button control (called "Save") at the bottom, set the OnSelect property to following:
ForAll( /* <-- Save Rating records into your SP list */ Gallery1.AllItems, Patch( 'YourSPList', Defaults('YourSPList'), { Title: "Rating Image App - " & Now(), PictureName: 'File name with extension', RatingValue: Rating1.Value } ) )
Then if you want to get the average rating for each Image file in your SP Library, you could take a try with the following formula:
Average( Filter('YourSPList', PictureName = "A specific image file name"), RatingValue )
If you share your app with other users in your Org, when they run this app, they may not see these images within the Gallery. It is an known issue with images stored in SP Library that pictures that need authentication on SharePoint are not supported yet within PowerApps when running an app in Mobile device or other users run this shared app.
Please check my response within the following threads:
As an alternative solution, you could consider create another SP list data source (not the above SP List to store your Rating records), and a Hyperlink column (Format url as Hyperlink) within it. Then copy URL link of the image files in your SP library, create corresponding record within your SP list and put the copied URL link within the Hyperlink column.
Within your app, use above new created SP list as data source instead of your SP Library, to display the images files within your Gallery.
As another solution, you could consider display thumbnail images of your Image files stored in your SP Library within your app. Please check and see if the following blog would help in your scenario:
Please take a try with above solution, then check if the issue is solved.
Best regards,
Hi @v-xida-msft.,
Thanks for sharing this information and it was quite useful, After following the steps I was able to make it work, however when I shared it with other users few of them were able to see the images in Microsoft Edge browser, few in both Chrome and Edge but few could not see them in either of the browsers.
Not sure, what's going wrong here?
Thanks!
Hi @v-xida-msft.,
Thanks for sharing this information and it was quite useful, After following the steps I was able to make it work, however when I shared it with other users few of them were able to see the images in Microsoft Edge browser, few in both Chrome and Edge but few could not see them in either of the browsers.
Not sure, what's going wrong here?
Thanks!
User | Count |
---|---|
195 | |
123 | |
86 | |
48 | |
41 |
User | Count |
---|---|
281 | |
163 | |
138 | |
80 | |
76 |