Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

Setting Variable based on value in Multibox.....

I have a multibox which contains FISYR, FISPD and WEDAT.  I want to set a variable (vDate) based on the WEDAT the user selects.  Help.

Thanks

1 Solution

Accepted Solutions
MayilVahanan

HI

Try like this

create a variable, vDate

value:  =GetFieldSelections(WEDAT)

hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

15 Replies
MayilVahanan

HI

Try like this

create a variable, vDate

value:  =GetFieldSelections(WEDAT)

hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
tmumaw
Specialist II
Specialist II
Author

Thanks.....That is just what I was looking for.....

tmumaw
Specialist II
Specialist II
Author

One added question.  I have another variable based on vDate which looks like this  =addmonths(vDate,-12).  Is there a way to format the outcome?  Currently it's MM/DD/YYYY and I would like it to be YYYY-MM-DD

CELAMBARASAN
Partner - Champion
Partner - Champion

Use Date(addmonths(vDate,-12),'YYYY-MM-DD')

or set Default date format as 'YYYY-MM-DD'

SET DateFormat='YYYY-MM-DD'; which is at the start of the file

MayilVahanan

HI

Try like this

Make sure,vDate is a single value, for multiple value is not work

=Date(AddMonths(vDate,-12),'YYYY-MM-DD')

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
tmumaw
Specialist II
Specialist II
Author

Thanks

tmumaw
Specialist II
Specialist II
Author

Thanks

tmumaw
Specialist II
Specialist II
Author

Since you are on such a great roll I have one other question.  I need to set a variable based on the FISYR_T and FISPD_T from a multibox, then calculate a rolling 12 months based on the selection....any ideas  thanks Thom

MayilVahanan

HI

Is both are  FISYR_T and FISPD_T date field?? you want to load data between this values?

vFisyr = GetFieldSelections(FISYR_T)

vFispd = GetFieldSelections(FISPD_T)

=Sum({<Date = {'>=$(=Date(vFisyr))<=$(=Date(vFispd))'}>}Sales)

is not:

vStart =GetFieldSelections(WEDAT)

vEnd =Date(AddMonths(vDate,-12),'YYYY-MM-DD') // AddMonths(vDate,-12) acccording to date format

=Sum({<Date = {'>=$(=Date(vStart))<=$(=Date(vEnd))'},FISYR_T = {'$(vFisyr)'},FISPD_T = {'$(vFispd)'}>}Sales)

edit:

Am in outside. Sorry for incovenience. Tomo will post further.

hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.