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

Refresh gallery issue

Hello

I am developing an simple app where there is an option to upload a file to a Azure blob storage container. In the gallery below that I want to show the contents of the blob. The problem is when I upload the file, it gets saved at proper container but the gallery is not refreshed with the newest file which I uploaded. I tried to add an Reload icon and OnSelect I added the refresh code like Refresh(AzureBlobStorage.ListFolderV2("JTJmb2tvbm9taQ==").value) but I guess that is not allowed. I am very new to powerapps so need help in solving this issue.

 

Regards

Priya

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Anonymous ,

 

I think you need a table to record the folder permission to each user, then apply filter function to items property of gallery.

1. if each user only have one folder , the table looks like: 

Annotation 2019-10-22 170326.png

Filter(MyCollection, FolderColumn = LookUp(Table,UserName = User().Email).FolderName) 

2. if each user have mulitiple folders, the table looks like:

Annotation 2019-10-22 172018.png

Filter(MyCollection, FolderColumn in LookUp(Table,UserName = User().Email).FolderName)

Hope this can help.

Best regards,

Sik

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Is it possible to auto-refrsh the gallery?

v-siky-msft
Community Support
Community Support

Hi @Anonymous ,

 

Yes, it is useless to refresh an action. It is only support to refresh a connected data source.

Here is a workaround for your reference:

AzureBlobStorage.ListFolderV2 is an action for user to list all folder, if we want to refersh all folder, we just need to repeat this action.

If you use a collection to collect all folder information and to be the data source of gallery, you can set clearcollect() function to OnSelect property of Reload Icon.

For instance, if you have applied ClearCollect(MyCollection, AzureBlobStorage.ListFolderV2("JTJmb2tvbm9taQ==").value) experssion, and MyCollection is the data source of Gallery, you can still apply that experssion to Reload icon's OnSelect property.

Once you click the Reload icon, you will retrieve the lastest Folders, and show up in the gallery.

Best regards,

Sik

Anonymous
Not applicable

hello @v-siky-msft 

Thank you so much for your solution. But now client added few conditions in the requirement. They will create 3 folders inside a container. Each user will have access to one folder. So when they will refresh the gallery then they should see the folder they have access to. I have no idea how this also can be achieved.

 

Regards

Priya

Hi @Anonymous ,

 

I think you need a table to record the folder permission to each user, then apply filter function to items property of gallery.

1. if each user only have one folder , the table looks like: 

Annotation 2019-10-22 170326.png

Filter(MyCollection, FolderColumn = LookUp(Table,UserName = User().Email).FolderName) 

2. if each user have mulitiple folders, the table looks like:

Annotation 2019-10-22 172018.png

Filter(MyCollection, FolderColumn in LookUp(Table,UserName = User().Email).FolderName)

Hope this can help.

Best regards,

Sik

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (84,807)