1 Reply Latest reply on Jun 2, 2014 9:39 AM by philmodjunk

    Remove the letters (-PARTS) from a field

    dansan500

      Title

      Remove the letters (-PARTS) from a field

      Post

           I have a database that a user has corrupted by adding words on the end of and Index field....

           Now I need to remove them without removing the index in that field

           Can you help

           Example would be [18-007528-00-PARTS]

           Remove -PARTS

            

        • 1. Re: Remove the letters (-PARTS) from a field
          philmodjunk

               Do this on a copy of the file:

               Show all records on a layout based on the table defining this field. This field must be present on this layout.

               Click into this field and select Replace Field Contents.

               Select the calculation option.

               use a calculation patterned after this example:

               Substitute ( yourField ; "-PARTS" ; "" )

               Substitute is case sensitive so you'll need to modify this approach if the user did not always use all caps when entering this data.

               once this is fixed:

               Go to Manage | Database | Fields, find this field and select the "Prohibit modification" option to ensure that this cannot happen again.

               On each layout where the field is visible, select it in layout mode and remove Browse mode access to make this a bit less confusing to the user. (if they can't enter the field to edit it while in Browse mode, they'll never get an error message telling them that they can't modify the field.)