Skip to main content

Filter smart shapes to return one property by a different property

  • February 22, 2021
  • 1 reply
  • 42 views

David U102

I want to display a list of values for one property on a smart shape that is filtered by a different property on the same shape. So if I have a Container with shapes with properties that return the arrays Job List = [$25$50$26] and Ship By Month = [232] I would want the function to result in [$25 $26].

So far I have gotten to this code which isn't working =FILTER(CONTENTS."Job List"@"Ship By Month"=2)

What am I doing wrong?

Comments

Clara H
  • Lucidite
  • February 23, 2021
Hi David

Thanks for posting on the community! Unfortunately what you are trying to do is not possible using the Filter formula. The purpose of this formula is to take in and read through all of the contents in your smart shapes and return the data that fulfills the requirements in the form of arrays. It is not possible to return a certain property of your content using just the filter formula.
 
When using the Filter formula you give the formula two inputs:
  1. The list/contents you are looking to search
  2. The condition/rule you are going to apply to this content
Currently the function you have written is not receiving any output because the conditions(@"Ship By Month"=2) do not apply to the content given it to search (CONTENTS."Job List").  What we want to do is apply the conditions to all of the content in your smart shapes. Try the formula: {{=FILTER(CONTENTS@"Ship By Month"=2)}}.
 
Unfortunately the output you receive will be arrays of the data that fit the conditions instead of just the single property that you are looking for but you will have access to that data.
 
If this will not work for you try nesting formulas or look for a different formula entirely using our Formulas article. Hope this helps!