Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to get selected value of field in Script ??
I tried GetCurrentField[FiscalYear] ; but it does not work out.
Thanks
BTW try this expression:
If (_CalendarType = 'Fiscal' , GetFieldSelection([Fiscal Year]), if (GetSelectedCount(_CalendarType) = 0, $(vSalesBookUsage)))
If SalesBookUsage is a field (i.e. an Amount) put an aggregation expression in vSalesBookUsage, like
SET vSalesBookUsage = 'Sales Book Usage = ' & sum(SalesBookUsage);
or define something similar in the Variable Overview.
Best,
Peter
Try With
=Getfieldselections( [FiscalYear] )
Regards
Anand
Hi Nikhil,
GetCurrentField works on groups - the parameter should be a group name. It does not operate on fields (the function name is not particularly clear)
Have you looked at the syntax for getfieldselections()?
Hope this helps!
GetCurrentField can't be used in a script.
It can only be used in chart expressions in the UI.
Hey,
It works but now i want if nothing is selected in _CalendarType then SalesBookUsage should be visible in straight table caption. How can i acheive this??
My script is:
If(_CalendarType = 'Fiscal' , GetFieldSelection([Fiscal Year])).
thanks
Hey,
It works but now i want if nothing is selected in _CalendarType then SalesBookUsage should be visible in straight table caption. How can i acheive this??
My script is:
If(_CalendarType = 'Fiscal' , GetFieldSelection([Fiscal Year])).
thanks
Hi,
Use variable here try dynamically store the SalesBookUsage value in the variable and then use it here in the variable.
Ex:-
If(_CalendarType = 'Fiscal' , GetFieldSelection([Fiscal Year]), $(vSalesBookUsgae) ).
Also it does not seems your expression works in getfieldslection condition check once but you deleted the eariler messsage on that i explain the correct way to use the getfieldselections().
Ex:- Like this ways
if( GetFieldSelection(_CalendarType) = 'Fiscal' , ([Fiscal Year]), $(vSalesBookUsgae) )
Regards
Anand
Hey ,
Thanx anand but still my problem is not solved.
My expr is like:
=if(_CalendarType = 'Fiscal' , GetFieldSelections([Trade Fiscal Year]) & '-' & GetFieldSelections([Trade Fiscal Quarter]) ,
if(vTradeCalendarDateType = '1D' , date(max({1}TradeDateMaster), 'MM/DD/YYY') , $(vSalesbookUsage))
) Now when i select any date, in my table caption date is visible but when i clear everything then still last selected date is there. But i want when i clear everything , SalesbookUsage should be visible.
What to do??
Nikhil,
you're talking about expressions, not about any script. With script, people refer to the load script as presented in the script editor (File->Edit Script...) That's an entirely different ball game.
BTW try this expression:
If (_CalendarType = 'Fiscal' , GetFieldSelection([Fiscal Year]), if (GetSelectedCount(_CalendarType) = 0, $(vSalesBookUsage)))
If SalesBookUsage is a field (i.e. an Amount) put an aggregation expression in vSalesBookUsage, like
SET vSalesBookUsage = 'Sales Book Usage = ' & sum(SalesBookUsage);
or define something similar in the Variable Overview.
Best,
Peter