Serverformulafill question
William Conable
wconable at columbus.rr.com
Sun Jan 27 19:39:04 PST 2008
>
> I think, however, that what you want here is this:
>
> str(date(AudDate))
>
> Here is the entire formula:
>
> execute {serverformulafill Instrument Contains "voice" and «Audition
> Date»=}+str(date(AudDate))+{,str(seq())}
>
Again this makes perfect sense, but again I am getting the error
message that the selection formula may not use any variables. I
started fooling around:
This works perfectly (though it doesn't do what I need):
field flag
serverformulafill Instrument = "voice",str(seq())
This, however:
field flag
serverformulafill datepattern(«Audition Date»,"mm/dd/yy")
="1/18/08",str(seq())
gets me the "Selection formula cannot include any variables" alert. I
believe it should be selecting the records on the server for which
the field Audition Date contains the date 1/18/08. What variable are
we talking about?
serverformulafill is a command.
datepattern(date,pattern) is a function.
«Audition Date» is a date field.
"mm/dd/yy" is a string constant (the date pattern).
= is an operator
"1/18/08" is a string constant.
after that it's no longer the selection formula.
Where's the variable?
[In passing, you said,
> The constantvalue( function really isn't necessary if you know the
> type
> of data you are dealing with. The advantage of constantvalue( is
> you can
> use it in situations where you don't know what the data type is -- it
> will automatically figure out the data type and convert the data to a
> constant that represents that type of data (basically that means
> adding
> quotes to text, while simply converting numbers to text w/o quotes).
>
> In fact, not only is constantvalue( not necessary, in this
> situation you
> are forbidden to use it. The parameter of a constantvalue( function
> must
> evaluate to a field or variable name -- it cannot be an expression
> that
> calculates a value. That's ok, though, because if you want to use an
> expression that calculates a value you obviously know what the
> resulting
> data type will be and you can explicitly convert that value to a
> constant yourself, using either the str( or the quoted( function.
This is very interesting, useful and reasonable; I was using
constantvalue( because that's what the Enterprise handbook suggested
as a way to get around the prohibition against using variables on a
serverformulafill. I just pasted it in with appropriate
modifications. Perhaps this section of the handbook could be tweaked?]
Thanks for bearing with my persistence here.
Bill Conable
More information about the Qna
mailing list