Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have scenario where in i have to make report fot inventory ageing depending upon the expiry as on date,
following is the code i have written but it shows script error please help it is urgent task for me.
If(num(Date(floor(max(EDATE)))-Date('$(vDateForAgeing)'))>=1 and num(Date(floor(max(EDATE)))-Date('$(vDateForAgeing)'))<=30,'1-30',
if(num(Date(floor(max(EDATE)))-Date('$(vDateForAgeing)'))>=31 and num(Date(floor(max(EDATE)))-Date('$(vDateForAgeing)'))<=60,'31-60',
if(num(Date(floor(max(EDATE)))-Date('$(vDateForAgeing)'))>=61 and num(Date(floor(max(EDATE)))-Date('$(vDateForAgeing)'))<=90,'61-90',
if(num(Date(floor(max(EDATE)))-Date('$(vDateForAgeing)'))>=91 and num(Date(floor(max(EDATE)))-Date('$(vDateForAgeing)'))<=180,'91-180',
if(num(Date(floor(max(EDATE)))-Date('$(vDateForAgeing)'))>=181,'181+',
if(num(Date(floor(max(EDATE)))-Date('$(vDateForAgeing)'))<1 ,'Expired',
if(IsNull(date(max(EDATE))) OR Date(max(EDATE))='','Date NA'))))))) AS InvDaysSelection
vDateForAgeing=
=IF(ISNULL(GetFieldSelections($(vMonthName)))=0 OR ISNULL(GetFieldSelections($(vFinancialYear)))=0,DATE(MAX($(vPostingDate))),DATE(Today()))
Please help it doesnt shows the bucket at all....
Hi Rohit..
in text object the function GetFieldSelections($(vMonthName)) will work because the text object is created on UI..
but in the edit script the variable vDateForAgeing will not take value from GetFieldSelections function.
instead of GetfieldSelections try to calculate the vDateForAgeing variable using Let statement.
Hope you understand the issue with GetFieldSelections in edit script.
Sushil
Hi rohit,
where are you using this expression... in edit script or in chart expression..
if it is in edit script then please think that how GetFieldSelections function will work in the script...it will work only in UI.
HTH
Sushil
Hi Sushil
I am using this in edit script i used that expression in text object it is giving proper results...
Thanks
Hi Rohit..
in text object the function GetFieldSelections($(vMonthName)) will work because the text object is created on UI..
but in the edit script the variable vDateForAgeing will not take value from GetFieldSelections function.
instead of GetfieldSelections try to calculate the vDateForAgeing variable using Let statement.
Hope you understand the issue with GetFieldSelections in edit script.
Sushil
Hello,
Untill now the logic was as off date means
If(num(Date(floor(EDATE))-Date(today()))>=1 and num(Date(floor(EDATE))-Date(today()))<=30,'1-30',
// if(num(Date(floor(EDATE))-Date(today()))>=31 and num(Date(floor(EDATE))-Date(today()))<=60,'31-60',
// if(num(Date(floor(EDATE))-Date(today()))>=61 and num(Date(floor(EDATE))-Date(today()))<=90,'61-90',
// if(num(Date(floor(EDATE))-Date(today()))>=91 and num(Date(floor(EDATE))-Date(today()))<=180,'91-180',
// if(num(Date(floor(EDATE))-Date(today()))>=181,'181+',
// if(num(Date(floor(EDATE))-Date(today()))<1 ,'Expired',
// if(IsNull(date(EDATE)) OR Date(EDATE)='','Date NA'))))))) AS InvDaysSelection
means here i was calculating as of but now the requirement is as on means any gven date,
so i am using this logic..
How would i would write let
Please post the sample app
Hey,
I found out solution instead of using in in script i used it as an expression ...
Thanks for your patirnce buddy,
keep helping me..
Thanks and Regards,
Rohit