cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
natmaxex
Resolver I
Resolver I

Is not in array

I now know you can check if something is in an array or collection by using If(item in otherItem, true) but is there a way to do the opposite like If(item notIn otherItem, true)?
Or even better how would i check if collection items are not it Gallery Items or item array

1 ACCEPTED SOLUTION

Accepted Solutions
eka24
Super User III
Super User III

 

Have tested the following

Assuming the variables are:

Set(temsArrayA,["itemOne","itemTwo","ItemThree","ItemFour"]);
Set(temsArrayB,["itemOne","itemTwo"])
 
Filter as:
Filter(temsArrayA,Not(Value in temsArrayB.Value))
 
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

9 REPLIES 9
eka24
Super User III
Super User III

You use Not for the Opposite

Example:

Filter(Table1,Not(ColumName in Table2.ColumnName))

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

JayMagness
Super User
Super User

Hi,

 

You are on the correct path need to say something like if it is not equal to that.

 

Remember this is all formulas like Excel Formulas. 

 

If you want we can get on a teams session just email me at Jay@research-nest.com

 

Almost
I have two variables ItemsArrayA, ["itemOne","itemTwo","ItemThree","ItemFour"] and ItemArrayB, ["itemOne","itemTwo"] and i want to return that ItemThreee and ItemFour are missing to ItemArrayC, ["ItemThreee ","ItemFour "].

Maybe like something kinda like this idk.

 

 

Set(ItemArrayC,If(ItemArrayB.value notin ItemArrayA,ItemArrayB.value))

 

 

or instead of Set use Collect

or how about something more like this???

 

Concat(ItemArrayB,If(Value NotIn ItemArrayA, Collect(ItemArrayC,Value)))

 

 

 

This doesn't work either

Concat(ItemArrayA - ItemArrayB,Value)

 

I tried

Collect(ItemArrayC, Filter(ItemArrayA,Not(ItemArrayB in ItemArrayA)))

I doesn't work  

eka24
Super User III
Super User III

 

Have tested the following

Assuming the variables are:

Set(temsArrayA,["itemOne","itemTwo","ItemThree","ItemFour"]);
Set(temsArrayB,["itemOne","itemTwo"])
 
Filter as:
Filter(temsArrayA,Not(Value in temsArrayB.Value))
 
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

Almost got it with this

Collect(ItemArrayC,If(Concat(ItemArrayB,Value) in ItemArrayB,Concat(ItemArrayB,Value&"
")))

yep, that did it, thanks.

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

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

Top Solution Authors
Top Kudoed Authors
Users online (67,843)