Create unique Form ID - Help on Date Format in Concat


i having problems formating date value in concat statement.  have tried write different ways , still can't seem string correct.

 

ideally, change date value julian value form id, settle mmddyy value without / or - in between.

 

codes have tried w/out date format string

 

javascript - calculate

program.formid.rawvalue=program.state.rawvalue + program.programnumber.rawvalue + program.programdate.formattedvalue;

 

returns - mo1234jul8,2010

 

 

 

-------------and--------------------

 

program.formid.rawvalue=program.state.rawvalue + program.programnumber.rawvalue + program.programdate.rawvalue;

 

returns - mo12342010-07-08

 

formcalc - calculate 

 

(this 1 has current date value, changes unique form id when reopened on day, why using programdate)

concat(date2num(date(), "ddmmyyy"),program.state.rawvalue, program.programnumber.rawvalue)

 

returns - 0mo1234

 

----------- , --------------------

 

if

 

 

(program.programnumber.rawvalue ne null) then

$.rawvalue

 

= concat(program.state.rawvalue, program.programnumber.rawvalue, program.programdate.formattedvalue)

else

$.rawvalue = ""

endif

 

 

 

returns - mo1234july8,2010  (formattedvalue)

              mo12342010-07-08 (rawvalue)

 

------------------------------------------------------------------------------

 

what better  language use, formcalc or javascript example?

 

i not skilled @ coding , use forums me, appreciate help.

 

thanks in advance - eve

to able use date in format want woudl use javascript new date(). coudl individual month, day , year , concatinate each 1 individually (standard javascript date functions). have add test code see if new form or subsequent opening of form. if subsequent opening woudl not need generate number again.

 

hope helps

paul



More discussions in LiveCycle Designer


adobe

Comments

Popular posts from this blog

CS5 Adobe Media Encoder: Encode failed because the source duration is nil.

cf_sql_integer vs cf_sql_bigint vs cf_sql_int??

localhost/joomla15/administrator doesnt work - Joomla! Forum - community, help and support