Difference between revisions of "SET FIELDVAL"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Helengeorge (Talk | contribs) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Specify the value to be entered in a field on a form | Specify the value to be entered in a field on a form | ||
Line 15: | Line 8: | ||
==See Also== | ==See Also== | ||
− | @...GET, SET VALIDATE | + | [[@...GET]], [[SET VALIDATE]] |
==Description== | ==Description== | ||
− | The SET FIELDVAL TO <expC> command allows modification of a field value that is being validated from data entered into a form. This command should be used in conjunction with the @ | + | The SET FIELDVAL TO <expC> command allows modification of a field value that is being validated from data entered into a form. This command should be used in conjunction with the @...GET VALIDATE WITH command. If the VALIDATE WITH option is used on non-character variables, SET FIELDVAL TO can still be used, because the <expC> is automatically converted to the data type of the calling variable. |
==Example== | ==Example== | ||
− | < | + | <code lang="recital"> |
procedure check_event | procedure check_event | ||
− | parameters data | + | parameters data |
− | if data | + | if empty(data) |
− | set fieldval to "BALLET" | + | set fieldval to "BALLET" |
− | endif | + | endif |
− | set validate on | + | set validate on |
return | return | ||
− | @10,0 say "Event " | + | @10,0 say "Event " get event validate with check_event |
− | get event validate with check_event | + | read</code> |
− | read</ | + | |
==Products== | ==Products== | ||
− | Recital | + | Recital |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
− | [[Category:Set_Commands]] | + | [[Category:Set_Commands|FIELDVAL]] |
+ | [[Category:Screen Forms]] | ||
+ | [[Category:Screen Forms Set Commands]] |
Latest revision as of 15:51, 23 November 2009
Purpose
Specify the value to be entered in a field on a form
Syntax
SET FIELDVAL TO <expC>
See Also
Description
The SET FIELDVAL TO <expC> command allows modification of a field value that is being validated from data entered into a form. This command should be used in conjunction with the @...GET VALIDATE WITH command. If the VALIDATE WITH option is used on non-character variables, SET FIELDVAL TO can still be used, because the <expC> is automatically converted to the data type of the calling variable.
Example
procedure check_event parameters data if empty(data) set fieldval to "BALLET" endif set validate on return @10,0 say "Event " get event validate with check_event read
Products
Recital