hi everyone! a question regarding saved searches… ...
# suiteanalytics
s
hi everyone! a question regarding saved searches… i am doing a search on a child of a custom record that has sublists, value i’m getting here is T or F now my problem is I need to properly filter out that child should only appear if there’s no other value ex: record 1 has 2 Ts and 1 F = do not show record 2 has 1 T and no F = show i can’t seem to wrap my head about this, basically what happens is that it would still show up regardless of how I filter it, since I need to get the ID of the parent record basically do not show parent if any of the child has F
a
I think you should use summary search (group on parent record fields). In that case you can count child's Falses and via summary criteria skip entries with False count >1.
s
I forgot to mention… hence I didnt based the search on the parent since I have to get one of my criteria on a drill down field from the child record…
like this
or I’d be better doing this in suitescript? where I can do lookup of the fields
a
another approach would be to use aggregation functions in non summary searches. Thats a bit of advanced level and not documented very well but you will find a lot of examples on Google search.
s
first time i heard of it… i’ll check it out thanks!
a
formula example wich counts childs with the same parent ID: COUNT ({internalid}) OVER (PARTITION by{custrecord_doi_dayoff}) The key moment here is a space after COUNT, otherwise it will throw error
formula result is on the last column
s
gotcha, will play around with this formula. thanks a lot!
a
forgot one more thing, such formula doesn't work (drops error) in criteria window, you can use it in results only
d
I always thought the secret to getting PLSQL analytic functions to work in search results way to use a comment (like:
SUM/*comment*/({field})…
) Just using a space will makes things easier/neater