4 Replies Latest reply on Dec 15, 2011 11:24 AM by DavidCKantor

    trigger text field with other field entry

    DavidCKantor

      Title

      trigger text field with other field entry

      Post

      I am trying to do the following and am not sure how to go about it:

       

      I want a field "and" which can only have the word "and" in it and I want it to automatically fill with that word only when text is entered into another field called "name". So, when "name" is empty "and" is also empty but as soon as any characters are entered into "name", the field "and" is automatically filled with the text "and".

       

      is this possible?

       

      thanks

        • 1. Re: trigger text field with other field entry
          philmodjunk

          How will you use this "and" text?

          Both a calculation field and layout text with custom formatting can be used to make "And" appear or disappear. The best option depends on what you plan to do with this text.

          A calculation field:

          If ( Not IsEmpty (name ) ; "and" )

          or add "and" as layout text to the layout where you want it and use:

          IsEmpty ( YourTable::Name )

          to set the font size to 500 to keep "and" invisible until there is text in the field.

          • 2. Re: trigger text field with other field entry
            mgores

            Make your "and" field a calculation

            Case (IsEmpty(name); ""; "and")

            • 3. Re: trigger text field with other field entry
              DavidCKantor

              This field will be used when formatting address labels and merged letters. For example: if John Smith is married to Sally Smith I would enter "Sally" into field:name and then field:and will fill automatically. Then my label will say John and Sally Smith. Sometimes there is a partner and sometimes not so I'm trying to simplyfy the process of putting the "and" onto the labels.

               

              <first_name><and><partner_name><last_name>

              I'm planning to actually have:

              <first_name><and><partner_first_name><last_name><and_2><partner_full_name>

              where <partner_full_name> and <and2> are for partners with different last names. When the last name is the same <partner_full_name> is blank and thus so is <and_2> so they don't print. When partner's last name is different <partner_first_name> will be left blank and will not trigger <and> therefore those won't print.

              Is this a reasonable way to go about it?

              thanks

              • 4. Re: trigger text field with other field entry
                DavidCKantor

                @PhilModJunk

                Works great thanks