web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Remove and Collect in ...
Power Apps
Unanswered

Remove and Collect in one button is not working.

(0) ShareShare
ReportReport
Posted on by

Hi,

I'm using RemoveIf and Collect in one button, removal is happening but it is not collecting any data.

The scenario is: I've Saved filter in TempFilter table that table data is visible inside Gallery named as Vg_Saved_Filter1.

and there is another Gallery named as ReceivedGal in which data is coming from Noti Table.

So when user shared any filter it will come into Noti table (Received Gal) and if the received filter name is already exist in TempFilter table (Vg_Saved_Filter1) the it have to override the TempFilter data with new selected received filter data. 

 

Set(globalFilter, LookUp(TempFilter, Id=User().Email && Active = "Y", FilterName));
ClearCollect(colFilter, Filter(colGalleryData,FilterName in colSelectedFiltersForAction.FilterName));
//RemoveIf(TempFilter, FilterName in colFilter.FilterName);



If(!fromNotificationPanel,
If(globalFilter in colSelectedFiltersForAction.FilterName,
Set(genericMessage, "Heads up! The following filter which is set as global filter will be overridden");
Set(boldMessage, globalFilter);
Set(headerMessage, "⚠ Your Default Filter will be Overridden!");
Set(showOverride, false);
Set(overrideDefaultFilter, true);,
ForAll(
colSelectedFiltersForAction,
// If(FilterName in colCommonFilters.Name, RemoveIf(TempFilter, Uuid = FilterId));
If(FilterName in colCommonFilters.Name, RemoveIf(TempFilter, FilterName in colFilter.FilterName));

Collect(
TempFilter,
{
Uuid: Text(Now(), "") & Left(User().Email, 8),
FilterName:FilterName ,
Id: User().Email,
CountryList: LookUp(TempFilter, Uuid=FilterId, CountryList),
SelectedDate: LookUp(TempFilter, Uuid=FilterId, SelectedDate),
BusinessAreaList: LookUp(TempFilter, Uuid=FilterId, BusinessAreaList),
SystemCatagoryList: LookUp(TempFilter, Uuid=FilterId, SystemCatagoryList),
IvkGroupList : LookUp(TempFilter, Uuid=FilterId, IvkGroupList),
SystemMaterialList: LookUp(TempFilter, Uuid=FilterId, SystemMaterialList),
Active: If(globalFilter = FilterName, "Y", "N"),
CreatedOn: Now()
}
);


);

// remove filter from the list
RemoveIf(
colSharedFilters,
Id in colSelectedFiltersForAction.Uuid
);

RemoveIf(
colSharedFilterInclRead,
Id in colSelectedFiltersForAction.Uuid
);

ForAll(
colSelectedFiltersForAction,
RemoveIf(
Notification,
Id=Uuid
)
);

Clear(colSelectedFiltersForAction);
Set(showGenericDialogue, false);
)

);


Set(showGenericDialogue, false);
Notify("Filter(s) overridden successfully.",NotificationType.Success,5000);

 

If there is mistake while writing removeif condition please let me know.

Categories:

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard