Switching 'passing' to 'ytd' as requested, though this is weird.
[capital-apms-progress.git] / inc / ofc-set-l.i
blobb5b1b47e39c30424ba1f096b68721d4db8b3bf4a
1 /* ----------------------------------------------------------------------------
3 Purpose: Search for an office setting with a Logical value
5 Parameters: {1} - The name of the office setting
6 {2} - The name of the logical variable to define and store the
7 value in
8 {3} - (Optional) If the setting is not found then display in a
9 message alert-box of type {3}
11 Notes: Office must be available
13 -------------------------------------------------------------------------------*/
15 DEF VAR {2} AS LOGI NO-UNDO.
17 FIND OfficeSetting OF Office WHERE OfficeSetting.SetName = "{1}"
18 NO-LOCK NO-ERROR.
20 {2} = IF AVAILABLE OfficeSetting THEN (TRIM(OfficeSetting.SetValue) BEGINS "Y")
21 ELSE ?.
23 IF "{3}" <> "" AND NOT AVAILABLE OfficeSetting THEN
24 MESSAGE {2} VIEW-AS ALERT-BOX {3}.