I have an Object: "Equipment Register" which is re

Posted by RustyPipe on 03-Feb-2016 19:29

I have an Object: "Equipment Register" which is related to (many equip register to one Area, one Site, one Plant, one Unit) an address if you like. 

Object: Area, Field Label "Area"

Object: Site Field Label "Site"

Object: Plant, Field Label "Plant"

Object: Unit, Field Label "Unit"

All are text fields, customer fills in each Area Site Plant and Unit  as he chooses then picks them as per thier own requirements (customers previous inputs)

In a related field to "Equipment Register" I have "sub equipment" (parts of the equipment, vessel end shell nozzle etc) and I am trying to show the Concatenated Address as per Area Site Plant and Unit

So I make a formula field in "Sub equip" to show "Address Summary" the concatenated version of the data

and I have written in Javascript as a string (as per the Rollbase pdf instructions which show)...

"{!lastName}, {!firstName}" "Ellison, John" 

Valid and efficient concatenation of two tokens

So I use "{Area}, {Site}, {Plant}, {Unit}";

But even after it validates it does not show on the UI what am I doing wrong?

Any ideas

All Replies

Posted by Shiva Duriseati on 04-Feb-2016 13:17

Hi Rusty,

Please help me with the below information.

1)Do you need to have auto creation of record with "AddressSummary" field , when record is created in "Equipment Register" object?
2)(Or) Do you want to retrieve "AddressSummary" field when one of "Equipment Register" is selected from "Sub Equipment" object?

1)If you want to update the field "Address Summary" in "Sub Equipment" object, I would suggest you to go with "Object Script" trigger which has to be created in "Equipment Register".

Please use the below code in "Object Script" trigger.
var area="{!R58140.name#text}";
var plant="{!R58158.name#text}";
var site="{!R58149.name#text}";
var unit="{!R58167.name#text}";

Whenever a new record is created in "Equipment Register",the above code will create a record in "Sub Equipment" component by updating Address Summary. Please make sure to check "After Create" and "After Update" Checkboxes in trigger definition.

2)If you want to get the "AddressSummary" when a record is selected from "SubEquipment" component. As you said please create a formula field let's name it "AddressSummary" then please use the below code in "Formula Field" and set the return type as string.

var area="{!R58343.R58140#text}";
var plant="{!R58343.R58158#text}";
var site="{!R58343.R58149#text}";
var unit="{!R58343.R58167#text}";
return area+","+plant+","+site+","+unit;

Attaching app.xml for your reference.

Please revert back if you have any queries.



Posted by RustyPipe on 04-Feb-2016 15:11


Many thanks

I will try these items


This thread is closed