Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Please help me on to fix this set Analysis script, type field not working when I use '+'
=Count({<type={'doc'},date={""} >+<date={">$(=Date(Today()))"}>} asset)
Type= doc
Date= Null or >Today()
Something like this
If((type = 'doc' or (type = 'lib' and not folder like '%/drive/%')) and (Len(Trim(date)) = 0 or date > Today()), 1, 0) as Flag2
and then this:
Count({<Flag = {1}>} asset)
May be create a backend flag
IF(Len(Trim(Date))=0,1) as null_Date
and use as below
=COUNT({<Type = {'Doc'}>*(<null_Date = {1}>+<Date = {">=$(=Date(Today()))"}>)}Asset)
Note that Type, Doc, Date, Asset all are case sensitive.
May be try
Count(
{
<type={'doc'},date={"=Len(Trim(date))=0"} >+
<type={'doc'},date={">$(=Date(Today()))"}>
} asset)
Extend this further may be like this by creating a new field like this
Date(If(Len(Trim(Date)) = 0, AddYears(Today(), 1), Date)) as NewDate
and then this
=Count{<Type = {'Doc'}, NewDate = {">$(=Date(Today()))"}>} Asset)
Thanks, can some one help with multiple operator using Set Analysis
=Count(type='doc' or (type='lib' and folder not like '%/drive/%'))
and (date='' or date>Today) asset)
Once again, why can't you just create flags in the script? unless you have a specific reason to do this on the front end, I would suggest to create flags in the script to do this
Something like this
If((type = 'doc' or (type = 'lib' and not folder like '%/drive/%')) and (Len(Trim(date)) = 0 or date > Today()), 1, 0) as Flag2
and then this:
Count({<Flag = {1}>} asset)
Perfect Thanks