cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Responsive Resident
Responsive Resident

Refresh gallery selected item or gallery it self

Hi,

I have 2 galleries on one screen, lets call them x & y.

In X i have listed all items from some SharePoint list. in Y i have the selected one of the x gallery.

In Y i do make some changes via patch directly to the list... once i press the button the change happens, so far good...

The problem is that the button should change (visible to false) but cant get him to refresh the value... if i put Refresh(....list) nothing changes...

One issue could be also that the gallery X has in items a variable (i have few buttons that set a variable, depending on which button user clicks, one example here (show all open projects:

 

Set(filtervar,Filter('projects', Status.Value = "Open"));

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Responsive Resident
Responsive Resident

i solved it by a weird way...

when the navigation is pressed it will also set a variable x with the value that is same as the buttons name....

Set(vartitle,"All Finished & Open")

 

the button that should disappear runs few ifs... since now he can look at the label that is updated by the variable...

If('svc-label'.Text = "All open reports", Set(filtervar,Filter('Project management engineering', TopLevelStatus.Value = "Open")));
If('svc-label'.Text = "Projects beyond deadline", Set(filtervar,Filter('Project management engineering', TopLevelStatus.Value = "Open" And End <= (Today()))););
If('svc-label'.Text = "Projects with a problem", Set(filtervar,Filter('Project management engineering', TopLevelStatus.Value = "Open" And AllRunningAsPlanned.Value = "false" )));
If('svc-label'.Text = "Missing updates", Set(filtervar,Filter('Project management engineering', TopLevelStatus.Value = "Open" And ((Value(Text(Today(),"[$-en-US]yyyymmdd")) - LastReportYYYYMM) > 30))));
If('svc-label'.Text = "All Finished & Open", Set(filtervar,Filter('Project management engineering', TopLevelStatus.Value = "Open" And Status = "Finished")));

 

View solution in original post

3 REPLIES 3
Dual Super User
Dual Super User

@Sifu 

 

After patching the item from Y gallery, you just try to set the same variable with the item.

 

Set(varItem, Patch(.......))

 

varItem is the data source for your gallery.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

 

Responsive Resident
Responsive Resident

hey, i had this idea already, the problem is that there are 5 different buttons/views=variables... hence i dont known at which view the user currently looks at (and there are only those two galleries). idea: is there a way how to get the current variable? I tried to add after patching  set(variable1... to var2 and then back... but did not work.
Responsive Resident
Responsive Resident

i solved it by a weird way...

when the navigation is pressed it will also set a variable x with the value that is same as the buttons name....

Set(vartitle,"All Finished & Open")

 

the button that should disappear runs few ifs... since now he can look at the label that is updated by the variable...

If('svc-label'.Text = "All open reports", Set(filtervar,Filter('Project management engineering', TopLevelStatus.Value = "Open")));
If('svc-label'.Text = "Projects beyond deadline", Set(filtervar,Filter('Project management engineering', TopLevelStatus.Value = "Open" And End <= (Today()))););
If('svc-label'.Text = "Projects with a problem", Set(filtervar,Filter('Project management engineering', TopLevelStatus.Value = "Open" And AllRunningAsPlanned.Value = "false" )));
If('svc-label'.Text = "Missing updates", Set(filtervar,Filter('Project management engineering', TopLevelStatus.Value = "Open" And ((Value(Text(Today(),"[$-en-US]yyyymmdd")) - LastReportYYYYMM) > 30))));
If('svc-label'.Text = "All Finished & Open", Set(filtervar,Filter('Project management engineering', TopLevelStatus.Value = "Open" And Status = "Finished")));

 

View solution in original post

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.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (48,438)