Clarity

  • 1.  Fields Mandatory at runtime

    Posted Sep 07, 2009 08:48 AM
    Is there a trick to make fields Mandatory at runtime based on other field values on the same screen? Please advise.


  • 2.  Re: Fields Mandatory at runtime

    Posted Sep 07, 2009 12:35 PM
    there is a good post on 'mandatory' and 'required' by Dave herehttp://caforums.ca.com/ca/board/message?board.id=CAClarityGeneralDiscussion&message.id=2540&query.id=72512#M2540  'mandatory' is a directive established at object level and is applied in all views & XOG. ak47 wrote:
    Is there a trick to make fields Mandatory at runtime based on other field values on the same screen? Please advise. Making something 'required' based on another field values isn't strictly speaking possible as the 'required' directive is for the whole view.
    Making one field respond to the value in another field is possible through the use of 'parameterized dynamic lookups'   [page 192. Clarity Administration Guide Version 8.1]


    Parameterized lookups provide the ability to control the results that display in a dynamic query, based on other values entered in a view. For example, in a filter section that has two attributes called “country� and “state,� you can filter the query results so that when a country is entered as a lookup value, only states that are relevant to that country display.

    Parameterized lookups are based on dynamic query lookups.

    Basic Steps
    1 Create a dynamic query lookup. See “Creating Dynamic Query Lookups� on

    2 Create an NSQL query with lookup parameters in the “Where� clause that will reference attributes in the object. See the following procedure entitled "Creating the NSQL Query for a Parameterized Lookup" for more information.

    3 Create a parameterized lookup attribute on the object and map the NSQL query lookup parameters to the appropriate object attributes. See the Clarity Studio Developer’s Guide for more information.

     


  • 3.  Re: Fields Mandatory at runtime

    Posted Sep 07, 2009 11:46 PM
    ^ even with the "parameterised lookups trick" (v8+) you still have the problem that the user has to "save" the page between entering the "base field" for the lookup associated with the "dependant field" to build its list of allowed values.  None of this is ideal...it is all a "trick" of one sort or another to get around significant deficiencies in the way that the GUI works.... I have not seen the "new GUI experience" in enough depth to see if this core/simple piece of application design is addressed in v13/14/15 (????)  ;-)  Dave.