2 Replies Latest reply on Oct 3, 2012 2:42 PM by PaulBurton_1

    Assign a "*" to the end of the Surname if another field contains text

    PaulBurton_1

      Title

      Assign a "*" to the end of the Surname if another field contains text

      Post

           I have a school database that has some fields with information in, but they are not normally displayed, they reside on a tab the I have to click on to inspect.  However, I would like an indication if the field concerned contains any text by adding a star/asterisk (*) to the end of the Surname in the main record.  That way the user is alerted to the fact there is information on another tab.  Suggestions of the most elegant way for doing this please.

        • 1. Re: Assign a "*" to the end of the Surname if another field contains text
          philmodjunk

               Is the Surname field an editable field?

               It may be easier to use a conditional format expression on the surname field to change the text color, fill color and/or text style as your indicator instead of appending the asterisk should this be an editable field.

               The following auto-enter calculation, however will append an asterisk if "TheField" is not empty.

               Let ( Sname = If ( right ( self ; 1 ) = "*" ; Left ( self ; Length ( self ) - 1 ) ; self ) ; //remove the asterisk if it was appended earlier
                         If ( IsEmpty ( TheField ) ; Self ; Self & "*" )
                      )

               Make sure to clear the "do not replace existing contents..." check box for this field.

          • 2. Re: Assign a "*" to the end of the Surname if another field contains text
            PaulBurton_1

                 Thank you.  In the end I took you suggestion of conditional format on the field to change its colur.  Managed to get the asterisk addition working, but it was not live, you had to visit the field, however the conditional format is "live" and does the job.  Thanks again.