Forum Discussion

Zachary's avatar
Zachary
Ideator I
6 years ago

How to Set RelationShip field value result as onFormPopulated ?

I have a itemtype call 'Part' , 

Part has a field call 'part price'  (type is decimal)

Part has a relationship call Part_detail

Part_detail has a field call 'RP price' (type is int).

I need "part price" to have thousand separator, but it is only for displayed, and does not need to be in the database after save

so I use onFormPopulated event to set

code as :

document.getElementsByClassName('part_price')[0].value = originalValue.replaceRegExp, '$1,'$2');

It is work !

but I need "RP priceto have  thousand separator ,too !  It is relationship  and has no onFormPopulated event to code 

What should I do to have the same effect as "part price" (thousand separator just for show , not need to save in database )?

and where I can edit relationship DOM ?

5 Replies

    • Zachary's avatar
      Zachary
      Ideator I

      HI Angelalp !

      This way will change all the fields in ARAS, I only need to change specific fields, I hope there is a more suitable method for me.
      thank you!!

      • Hello Zachary,

        You can try adding one federated property on relationship item type,also on that relationship item type add server event "OnAfterGet" and update that property using this.setProperty(PropertyName, Value);

        this will have all items in relationship so use this.getItemCount() to get all item and update specific item using for loop.