How to change the field type without affecting parent Table

rajeevsnow
Tera Contributor

Hi All,

we have a requirement to change the field 'description ' type to HTML in rm_story table and the the field is inherited from Task table , can someone please help me how to change description  field type without affecting parent Table?

 

 

5 REPLIES 5

jMarshal
Mega Sage
Mega Sage

You cannot. There is no way to do this without creating a new custom field on the extended table with the desired field type. You can override attributes of a field type for extended tables, but you can't change the field type.

You can disable (hide) the field inherited from Task and then name the custom field to be "the same" ("u_description")...but you cannot change/override/update the field of "rm_story.description" to be of "type" HTML instead of multi-line string (without changing the base table, that is).

Thank you Marshal for the info, 

If i create new custom field , how can i copy existing records ' description' field value to newly created custom field ?

 

I think the best way would be to add a dictionary override for the calculated value on the "description" field on the task table, so that it has the same value as your custom field.

This way the "description" field (not HTML, just string text) will always have the value (contents) of what your users input to the "u_description" (custom HTML on rm_story) for that table (rm_story), but it won't affect the base table or any other tables that extend task.

 

Go to the base Task table and find the "description" field (column), open that and click on the "Advanced" UI Link (at the bottom, near the related lists)...and then go to "dictionary overrides" and click "New". Then, on the new Dictionary Entry Override form, select to override the calculated value for the field on the rm_story table & set the value to be "current.u_description" (or whatever you named the custom field).

 

jMarshal_0-1687356298226.png

 

Note that I could be wrong with the syntax...I think you want to use "current." but you may need to write it as a regular script function or maybe just "return current.u_field_name". Play around with it a bit here to fit your needs...but this should accomplish your goal, if I understand what you're looking for.

 

Also note that you can go "the other way", too - where you can set up a calculated value (no dictionary override needed) on the custom field so that it is updated with data inputted to the description field, if that extended field is available on the rm_story form...but I don't think that's what your looking for here as it won't leverage the HTML properties of the custom field in any way (defeats the purpose).

Further, know that you can't go both ways at the same time (you cant have both fields being calculated values of each other) - if you want the fields to be synchronous (so that either can be updated and both have same value/content, on the rm_story table), you'll have to write a Business Rule instead.

Riya Verma
Kilo Sage
Kilo Sage

Hi @rajeevsnow ,

Hope you are doing great.

Here are the steps to implement this solution:

  1. Navigate to the 'Dictionary' module 

  2. In the 'Dictionary' module, search for the 'rm_story' table and open it.

  3. Locate the 'description' field and click on it to access its properties.

  4. Create a new field by clicking the 'New' button in the 'Related Links' section.

  5. In the 'New Field' form, provide a suitable name for the new field, such as 'html_description'.

  6. Set the 'Type' of the new field as 'HTML'.

  7. Under the 'Mapping' section, select the 'description' field from the parent 'Task' table.

  8. Save the changes and close the form.

  9. Once the new field is created, it will be available in the 'rm_story' table, specifically for storing HTML content.

  10. You can now update your forms, lists, and views to display and capture HTML content using the new 'html_description' field.

Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.
Regards,
Riya Verma