Applies to: the template language as discussed in April 2010; the thread names no Clarion version or chain.
Problem
In program code, if field = '' then select(?field) keeps focus on a field. The poster wanted the same for a template #PROMPT. #VALIDATE and the REQ attribute only check after the OK button is pressed.
Solution
- The first reply said it is not possible to hold the user on a #PROMPT until it is filled.
- What the thread suggested instead, in the order given:
- Do not enable the other fields until the first is filled, as is done with check marks (Carl S.).
- Put the prompts in a window of a Clarion DLL and call that procedure from the template with #RUNDLL; the parameter must be a string, and the parsing of the passed data is the hard part (Ole Morten H.).
- The poster solved it with
#BOXED,WHERE(Control <> '')and put all code that relies on the control inside that box. The poster reported it worked in testing so far.
Caveats
- The #BOXED answer hides dependent prompts; it does not stop the user from pressing OK with an empty field.
- The #RUNDLL idea was not tried in the thread; the second answerer had not used that route.
- The poster's testing was described only as "so far".
Today (2026)
Likely still the same, since the checks run on OK; not re-tested on a current build.
Sources: Amanda A. (Apr 2010, the question and the #BOXED result), Mike H. (Apr 2010), Carl S. (Apr 2010), Ole Morten H. (Apr 2010) in softvelocity.clarion.templates.