3 Replies Latest reply on Sep 22, 2014 7:22 AM by philmodjunk

    How to make Text field appear blank, not with a "0" - Custom Dialog box

    HugoLidia

      Title

      How to make Text field appear blank, not with a "0" - Custom Dialog box

      Post

      From a custom dialog one can select the field that you want the user to enter from your database table, however, as a text field why do these appear with a 0 in the custom dialog box and not simply blank?

       

      And how does one add a set of standard text to whatever the User input.

      e.g. Say User inputs "value is 75"  We want to be able to Amend this to be "value is 75€"

      Set field and Insert Text do not appear to be appropriate.

       

      NB - Why is it the simplest to things are the most difficult to find any help on from Filemaker Help files?

       

       

        • 1. Re: How to make Text field appear blank, not with a "0" - Custom Dialog box
          philmodjunk

          The fields should not appear with a 0 in them. You'll have to figure out what aspect of your database is putting that zero there. I'd check auto-enter settings as one possibility.

          To append additional text to what the user enters, it could be an auto-enter calculation such as:

          If ( Right ( Self ; Length (self ) ) ≠ "€" ) ; self & "€" )

          Set field can append text to the end of a field like this:

          Set Field [YourTable::field ; YourTable::Field & "€" ]

          But if you put the value 75 into a number field, you can specify number formatting, select the currency data format with the Euro symbol as the currency symbol.

          • 2. Re: How to make Text field appear blank, not with a "0" - Custom Dialog box
            HugoLidia

            Thanks PhilModJunk.  The fields being used are defined as Text. 

            I guess I must be missing something really basic here - I cannot enter your suggested calculation into the Calculated part of the Set Field box - doesn't like the syntax.  Or does your code go directly on the field in the database?

            (not sure is the images I have linked will upload, as one only sees this after the Post is submitted.)

            Also, what is the difference between specifying a calculation on the first box (Specify field Target) or the second box of the Set Field dialog (Calculated result) ?

            The Set Field highlighted line of code does NOT result in the € symbol being added, only the amount, even though script debugger shows the code is stepped through ( hence the value is assigned) , just without the € symbol

             

            • 3. Re: How to make Text field appear blank, not with a "0" - Custom Dialog box
              philmodjunk

              When Setting up Set Field, there are two Specify buttons that must be clicked. To get Set Field [Table::Field ; Expression], add set field to your script and click the first button (specify target field). Select Table::Field from the list of fields. Do not click the specify button next to the repetition box. Click OK to close this dialog box. Now click the lower specify button (calculated result) and create the expression to the right of the semicolon (;). Do not try to type in the semicolon.

              The auto-enter calculation will always append the currency symbol. The set field step will only do this if/when the script is performed--thus each may be the better option in different situations and my personal preference would be to put the numeric value into a number field and use data formatting to show currency symbols instead of inserting such text at all.