TOM HART wrote:
> I have a form and in an on before start I generate a variable tvCustrans I
> have been doing it this way
> set var tvCustrans =
> (.vEmpID+(ctxt(iday(.#now)))+(ctxt(imon(.#now)))+(ctxt(iyr(.#now)))+
> +(ctxt(ihr(.#now)))+(ctxt(imin(.#now)))+(ctxt(isec(.#now))))
> this is a unique number that is inserted into a table, this works fine with
> no problems for over a year
>
> recently I experimented with the format to generate the same number like this
> set var tvCustrans = (.vEmpID+(format(.#now,'MMDDYYHHNNSS')))
> this will work running it from Rbase but if I try to run it from a compiled
> app I get the message saying the number must be unique.
>
> In my app that is the only change I have made. Just wondering what is
> happening
>
Tom,
What version is your compiled application? The availability of "NN" for
formatting #NOW only appeared with the latest update or the one
previous to that. Previous to that you got errors when you tried to
format #NOW.
As an alternative pending resolution of your problem consider the following:
set var tvcustrans = (.vEmpID + FORMAT(.#DATE,'MMDDYY') + +
FORMAT(.#TIME,'HHMMSS'))
The above uses previously undocumented syntax to format DATE and TIME items.
Jim Bentley
American Celiac Society
--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]
(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body,
place any
text to search for.
================================================