cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
benyie
Helper I
Helper I

Nested RemoveIf

Hi!

I have trouble figuring out these nested data connections.

I want to remove each record in "InsuranceSplit" if column "InsuranceTypeSplitId" exists in the table "InsuranceTypes" BUT only where  the column "ClientSplitId" is also equal to my variable vClientSplitId.

 

"InsuranceSplit"

benyie_6-1660900004494.png

 

"InsuranceTypes"

benyie_3-1660898167168.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Gochix
Solution Sage
Solution Sage

Hi @benyie ,

You can do something like this:

ForAll(InsuranceTypes,
RemoveIf(InsuranceSplit,InsuranceTypeSplitId = InsuranceTypes[@InsuranceTypeSplitId] && ClientSplitId = vClientSplitId))


_____________________________________________________________________________________
Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

View solution in original post

4 REPLIES 4
Gochix
Solution Sage
Solution Sage

Hi @benyie ,

You can do something like this:

ForAll(InsuranceTypes,
RemoveIf(InsuranceSplit,InsuranceTypeSplitId = InsuranceTypes[@InsuranceTypeSplitId] && ClientSplitId = vClientSplitId))


_____________________________________________________________________________________
Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

Sorry @Gochix ! I was too quick, this actually didn't work as expected.

 

Because I first have to filter the table "InsuranceTypes" where the column ClientSplitId equals my vClientSplitId. After that I make the comparison and remove each record in "InsuranceSplit" if column "InsuranceTypeSplitId" exists in the filtered table "InsuranceTypes"

Hi @benyie ,

 

the formula does exactly what you are asking. I’ve checked at my end before posting it and it worked fine. If this doesn’t work for you then could you explain what does the formula do so we can see what to adjust. 

benyie
Helper I
Helper I

@Gochix Oh now I see it worked.

I only read 500 records from database right now.

Since this operation takes several records I couldn't first see that anything happened at all.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,224)