How to use color coding / field expressions for date fields?

Version 2

    [SUMMARY]

    Following the documentation / online help GoldMine Administrator Guide > Customizing GoldMine > Editing Field Properties > Editing Field Properties (Color Tab) in GoldMine 2017.1 and lower when creating an expression for setting conditional color coding depending on an empty date field by entering the following dBase expression:

     

    iif(empty(Contact2->UDATE),color("BrightRed"),color("Black"))

     

    will result in "The following dBase expression is invalid"

     

     

     

     

    - When using the label color with a dBase expression against a varchar/character field the expression works fine. For example same code agaiuser-definedined field.

    iif(empty(Contact2->USERDEF02),color("BrightRed"),color("Black"))

     

    [INFORMATION]/[RESOLUTION]

     

    If the user-defined fields are set up with a type date or numeric, it might be necessary to use additional expressions to convert the values

    into a string value, in order to evaluate them, for example for empty date fields the following examples can be used

     

     

    iif((empty(dtos(contact2->udate))),color("Brightred"),color("Black"))

    or

    iif(dtos(contact2->udate) < ' ', color('Brightred'), color('Black'))

     

     

    In the last two examples, the expressions are configured differently — Either is valid.

     

    Additional Notes: For further information about dBase expressions within GoldMine please refer to Using dBase expressions in GoldMine