Skip to main content

Notifications

Community site session details

Community site session details

Session Id : hZLNQ0zebQk4M4u3c+VVtT
Power Apps - Building Power Apps
Unanswered

refresh the elements of the gallery

Like (0) ShareShare
ReportReport
Posted on 7 Apr 2020 15:56:36 by

Good morning all,

 

I am working on a project with two applications (Apps 1 & Apps2). these two applications on connected
on a sharepoint list (listA).

 

the first application (Apps1) saves the elements in the listA.
the second application (Apps2) allows you to view the selected entry via a gallery and checks if everything is correct then the person checks it via a toggle (if toggle = true it is verified)

 

I set up a flow, as soon as an element is modified (toggle = true) then I copy the element in another list then I delete the item in listA.

What happens is that when I modify the item (toggle = true) the flow is executed within 5 minutes after the modification, but the gallery does not update.


the element is always present with the mention "verified" (toggle = true) except that the item has been deleted.

 

When I update my browser the gallery is updated.

 

I had set a timer to update my listA, but when the update is done it deselects the item from a gallery that I had selected before.

 

Do you think it is possible to update the list without its deselecting the item?

 

Thanks for your help

Categories:
  • PowerAddict Profile Picture
    7,314 Most Valuable Professional on 16 Apr 2020 at 03:41:27
    Re: refresh the elements of the gallery

    Thanks for the detailed response. Are your two issues correctly defined by the following 2 points?

     

    • Once a record is deleted by Flow, if you happen to click on that record in App A, you get an error that the record doesn't exist (which obviously you don't want)
    • If you are working on a different record (other than the one that just got deleted) in App A, when your gallery refreshes thanks to the timer, you lose your changes. 

    So if the second issue is resolved, will you be ok with using the timer to refresh the gallery? 

     

    If so, I am curious what the Items property of your form is. Is it Gallery.Selected? If so, can you make the following changes: 

    • When a user clicks on a record in the gallery, set the OnSelect of the gallery to: Set(currentRecord, ThisItem)
    • Then use currentRecord as the Items property of your form

     

    Let me know if this helps. 

     

    ---
    If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

     

    Thanks!

    Hardit Bhatia

    Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

  • Community Power Platform Member Profile Picture
    on 15 Apr 2020 at 09:26:54
    Re: refresh the elements of the gallery

    hi @PowerAddict,

     

    thank you very much for your feedback and your attention to my problem. 

    sorry to come back to you late.

     

    Just to make sure I understand the use case completely, I am listing the steps down. Let me know if I have missed any or if any one is incorrect: 

     

    1. There are two apps App1 and App2 (not sure how they fit in here - maybe App1 is a gallery of ListA items and App2 is a gallery of ListB?)

    App1 and App2 are very distinct.

    They are both connected to the sharepoint ListA list.

     

    2. When a toggle is set to Yes on an item from ListA gallery, the record is added to ListB

    App 1 saves the data in the listA then App2 validates the data by pressing the toggle on yes.

    There is only one list.

     

    3. Then that record is delete from ListA but your gallery of ListA items.

    a flow starts when created or modified. (delay 5 minutes)

    When the flow sees the verified field = yes, it creates this element in another list (list B or archive) then deletes the element from list A.

     

    as the gallery does not update automatically. When the item is deleted from listA, it is always present in the gallery.

    when you select the deleted item in the gallery, there is an error message stating that the item cannot be found in the list.

     

    4. Your issue is that the gallery of ListA items is getting reset (this is what I am not clear about)

    to overcome this problem of updating.

    I put a timer which refreshes the list.

    however this blocks me from all activity.

    (ex: I fill in data in the form, the update blocks me in my advanced and I have to be patient).

    I am rather looking for a silent update. see a means only updating the gallery data.

     

    5. You say you want to update the title from powerapps to powertest

    it is an item registered in list A and which is selected from the gallery.

     

    as you could see in the picture,

    I selected my element, which I wish to modify, (here I wish to modify the title) with the update, what I had typed (powertest) is erased with the update and return to the main title (powerapps)

     

    6. Is this for the same record that just got deleted?

    it is an element which is registered in the listA and which I wish to modify

     

    7. If not, is this a diff record that you were working on after setting the toggle to yes for a diff record (which no longer exists)

    no it's not a different element.

     

    8. And if this all is true, since the gallery is getting reset, you are losing track of the record that you were working on and the gallery resets to the 1st record?

    what you say fits well

     

     

     

    thanks,

    take care of yourself.

  • PowerAddict Profile Picture
    7,314 Most Valuable Professional on 09 Apr 2020 at 18:24:00
    Re: refresh the elements of the gallery

    Thank you @WarrenBelz 

     

    @Anonymous, 

     

    Just to make sure I understand the use case completely, I am listing the steps down. Let me know if I have missed any or if any one is incorrect: 

    1. There are two apps App1 and App2 (not sure how they fit in here - maybe App1 is a gallery of ListA items and App2 is a gallery of ListB?)

    2. When a toggle is set to Yes on an item from ListA gallery, the record is added to ListB

    3. Then that record is delete from ListA but your gallery of ListA items

    4. Your issue is that the gallery of ListA items is getting reset (this is what I am not clear about)

    5. You say you want to update the title from powerapps to powertest

    6. Is this for the same record that just got deleted?

    7. If not, is this a diff record that you were working on after setting the toggle to yes for a diff record (which no longer exists)

    8. And if this all is true, since the gallery is getting reset, you are losing track of the record that you were working on and the gallery resets to the 1st record?

     

    Let me know and we can take it further. 

     

    ---
    If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

     

    Thanks!

    Hardit Bhatia

    Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

  • WarrenBelz Profile Picture
    146,660 Most Valuable Professional on 09 Apr 2020 at 08:17:44
    Re: refresh the elements of the gallery

    Hi @Anonymous ,

    I will tag one of my colleagues @PowerAddict on this - I have not explored the process you are using.

  • Community Power Platform Member Profile Picture
    on 09 Apr 2020 at 08:01:53
    Re: refresh the elements of the gallery

    Hello @WarrenBelz ,

     

    initially, I had created this FLOW:

    Spoiler (Highlight to read)
    Screenshot_1.png

    as soon as there is a modification in the listA
    I get the elements and if checked is = true
    then I retrieve the attachment then create an item in another list (an archive list)
    then when the element is created in the archive list I delete the element in the listA.

     

     

     

    But when we select the checked item in powerapps the item being delete I had an error message (normal it no longer exists in the listA).

     

    so I was looking for a way to refresh that gallery.

     

    Spoiler (Highlight to read)
    pw1.gif

    I set up a timer with a refresh every 10 seconds but when I want to change the title of the document.
    (in the example I want to replace the title "powerapps" by powetest "but after 10 but everything resets with the update and I therefore lose what I had informed.)


    In any case thank you for the attention you bring to my problem.

     

  • WarrenBelz Profile Picture
    146,660 Most Valuable Professional on 08 Apr 2020 at 04:18:45
    Re: refresh the elements of the gallery

    Hi @Anonymous ,

    A couple of questions

    Do you use Refresh(YourDataSorceName) at some point after the Flow runs?

    Is there any reason you are using a Flow to update the second list rather then doing it directly from Power Apps?

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,660 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard