Change of label of field only in parent table

harshvardhan_11
Giga Expert

HI,

I have a requirement where I want to change a field only on parent table, and not on its child table. Is there a possibility of doing so, without adding label for all the childs.

E.g. I have field named 'Used by' which is being used by all child tables (lets say X,Y,Z) of a table(B) which is again a child of table(A).

(A)                     - Used by

  |

(B)                   - Used by

  |

(X)(Y)(Z)- Used by

I want to change the label of field to 'Using' in   table(B), and all other table should have the field label as 'Used by'.

(A)                     - Used by

  |

(B)                   - Using

  |

(X)(Y)(Z)- Used by

I used the label related list in field dictionary and changed for label for table (B) but it also changed the label for   (X)(Y)(Z).

Is there any possibility if I can change only for table (B) without creating any extra rows in label related list for all childs.

1 ACCEPTED SOLUTION

You may want to take a look at g_form.setLabel()



This could be used from within an onLoad client script to set the field label if your table is "B". Also see g_form.getTableName().



It might look something like this:



function onLoad() {


 


  if (g_form.getTableName() == "table_b")


        g_form.setLabelOf('field_name', 'Using');


 


}


View solution in original post

11 REPLIES 11

ctomasi Thanks for the clarification.



Got your point, you are right.


Thanks akshat, but I dont need to change any display value or any property related to dictionary override. Its just the label change.