How do I find a line item in a list subset?

vazqulu1
Occasional Contributor

How do I find a line item in a list subset?

Hi, I have a module in which I'm trying to determine if accounts are within an account list subset, if so return TRUE, so that I can then filter those records to import to another module.

 

I cant get the finditem to work for me, is there another way to do it? I also tried using a line item subset, but failed...

 

vazqulu1_0-1610654999637.png

the subsidiary view shows the correct items in the subset, but how do I check that the 'find x' items are in that list?

 

I must be missing something...any help or alternate method appreciated.  I didn't want to manually list the subset accounts in a formula...

 

thanks!

5 REPLIES 5
rob_marshall
Moderator

Re: How do I find a line item in a list subset?

@vazqulu1 

 

I think you are very close.  Take a look at this:

 

I have a list with a subset define:

 

2021-01-14_16-10-58.png

 

In my SYS Invoices module, I have a line item with the Applies To being the subset.  Line item is formatted to Boolean with the formula being True.

 

2021-01-14_16-11-17.png

 

When I exit the blueprint, since ss_Active: Invoices (the subset) is part of Invoices, it will show a check for the members that are in the subset

 

2021-01-14_16-11-43.png

 

Also, doing it this way versus doing a finditem() is better for performance reasons.

 

Looking at your formula, it looks like the subset is on L4 but you are doing your finditem on L5.  If this is correct and L5 rolls up to L4, then you will not be able to find it as the subset doesn't go down to L5.  So, if L4 is a parent of L5 and the subset is on L4, then create a line item on L5 (formatted to L4) with the formula being: parent(item(L5)).  Then you can do a lookup to the L4 subset:  SYS L4.Subset?[lookup:the line item for parent of L5]

 

Hopefully, that is what you are looking for

Rob

 

Rob

alexpavel
Certified Master Anaplanner

Re: How do I find a line item in a list subset?

@vazqulu1 

Indeed, the subsidiary formatted line-item cannot be used directly as a "filter" in a saved view, but it can be referred in any formula.

 

In order to create a usable filter line-item, just create a new boolean line-item without a subsidiary view and refer in the formula the subset subsidiary formatted line-item

alexpavel_0-1610718066230.png

 

alexpavel_1-1610718113832.png

 

 
 

 

vazqulu1
Occasional Contributor

Re: How do I find a line item in a list subset?

Thanks for the replies. I ended up changing the subset to a text field in the list and using a lookup to determine if the account was in the list set or not. I didnt want to create additional line items to be able to test or refer to the items.  Then my filter was just if TRUE.

 

vazqulu1_0-1613083479950.pngvazqulu1_1-1613083570292.png

vazqulu1_2-1613083868653.png

 

 

rob_marshall
Moderator

Re: How do I find a line item in a list subset?

@vazqulu1 

 

Just know, creating a filter like that is a huge performance hinderance because Anaplan does not read those 3 conditions at the same time, it reads them one at a time.  Meaning, it reads the data for the first filter condition, then of that returned data, it does another read for the 2nd filter, then another read for the 3rd condition which is why that is against best practice (Planual Rule 4.03-06).

 

Rob

JaredDolich
Master Anaplanner/Community Boss

Re: How do I find a line item in a list subset?

@vazqulu1 

Just to add to @rob_marshall - try to create a single line item that performs all three of those filter conditions if possible. I can attest to the poor performance when you use too many filters. 


Jared Dolich