Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a calendar object which uses the date field of table calendar.
How can i store the value of this field into a variable when user selects a single value.
eg:
if user selects 1/1/2013
variable vcaldate should be 1/1/2013
if user reselects to 1/10/2013
variable vcaldate should be 1/10/2013.
Thanks in advance.
Aaditya
Hi,
you can use trigger to set the variable with selected date:
goto- document properties->triggers
in field event trigger box, select date( required field)
->then press on onselect button.
->a dialogue box apears, then add event:
->action type external and action set variable
->after that u set variable name as vcaldate and value as
=
GetFieldSelections(Date)
Niranjan M.
HI Niranjan,
Thanks.
I tried working through this and it worked for day or month or year but when i try this as a complate date, this does not work.
Ex:-
i create a table as:-
load
when this value is stored in load event of the document in variable vCalDate, this is not getting the default value.
Even if it does, it return garbage when fetched in any text box.
Aaditya
Hi,
Please post a sample copy of your application.
Niranjan M.
try this
use variable like v1 with expression
=(SubField(GetcurrentSelections(),':',-1)) // for particular selection
SubField(GetCurrentField(Date),':',-1) // for define field name.
hope it helps
This is excellent! I also have had similar challenge. I immediately implemented it. So I think $::Year does not work in this case?
I also succeeded by creating a value:
Set vYearOnDemand = GetFieldSelections(Year);
We can use vYearOnDemand as double-dollar-sign $(=$(vYearOnDemand)) as variable.
======Sample App=========
Test: LOAD * INLINE [
Year,Value
2014,15
2013,14
2012,18
2011,13
2010,17
2009,15
2008,14
2007,17
2006,20
2005,14
];
Set vYearOnDemand = GetFieldSelections(Year);