0 Replies Latest reply on Feb 21, 2013 3:14 AM by elizabethcombrink

    How to change attribute size through Object Designer

    elizabethcombrink Employee

      Well you can’t do it through the Console tools (and as you will see from previous posts, its not recommended to be done through the back end).

       

      This is how I’ve just done it through the Console

       

      When creating an object using the Wizard, I invariably leave the Name field to default to size 20. Doh and that’s too small to be useful.  And I only realise this after I’ve created the window and start entering data. Gets me so often!! And I hate having my attribute name called something different to what I wanted it to be in the first place.

       

      So this is what you do for the Name field – you create a temporary attribute to hold the data and be the IsName field, so you can delete the incorrectly sized attribute and recreate it with the correct size and the name you wanted.  For any other attribute, you would not have to fiddle around with the IsName? attribute.

       

      1. Create a new attribute on the object, I just call it Temp, and make it the size you want. Make it mandatory, and back fill it. You can then change this field to be the Is Name field, and then make the incorrect field to be no longer mandatory.  (you may want to do this in a few steps and save in between)
      2. Update your window for the object to show the new Temp field.  Update the Temp field to be the names you want to be for any existing data you have already created (you are going to delete the incorrect field soon)
      3. Go back to the object window, and delete the incorrect field from the window, and save it. (Your window has to have the IsName? Field on it, and  has to be populated, even if its not unique)
      4. Make sure you have removed the incorrect field from all windows and queries where you may have used it (check the filters you may have created, and delete any from the objects you may have specified them against).
      5. On the Object, the incorrect field is no longer in use anywhere, and can now be deleted. – Save the object.
      6. And then do the whole process again, and create the Name field again, this time specifying the correct size, and transfer the data over, switch over the field on the object window.

       

      If you don’t mind having a the Name field to be different to what you had initially, then you don’t have to do the above twice, just create  a new field you with a new name, and switch over as described.

       

      As always with this kind of stuff, do it in your test system, and have a database backup you can revert to if it all falls apart.