function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Micky MMicky M 

Assign value with formula

Hi all i have two objects linked via a lookup and i want to assign a value from object 1 to object 2



no does anyone know how i can set the Project_Order.Effort to the same value as Project_Activity.effort so my formula is :

PO_Ref__r.Effort_From_Activity__c =  Effort__c

but this isnt setting a value its just a comparison. Does anyone know how or if this can be done?

Hi micky if i am not wrong you are trying to copy the value of project_order.effort to the value of project_activity.effort ? If that's the case
  • First go to the sobject in which you want to make field which copies data from other field.
  • create a field of type formula which returns text. Name it as you want . click nextUser-added image
  • The above is how your screen will be looking.
  • Select advanced formula, and hit insert field and navigate through your field from which you want to copy data, add it and save
That's it. it shall do the trick.. If solved mark it as solution...
Micky MMicky M
Hi, no thats the problem the lookup goes from Activity to PO but i want to set a value on PO

so on activity i have a look up to the PO, in the advanced formula editor i can see all the fields on the po but not from the po to activity and i need to be able to set the value of a field on the po .. does that make sense?
Hi Mickey,

Best way is to click on the Insert fields and find the field.

If you are writing this formula on Object 1

Then it would ideally be like this

Object1__c.Field1__c = Object1__r.Object2__c.Field2__c ;

Project_Order__c.Effort__c = Project_Orde__r.Project_Activity.effort__c ;

Hope that makes sense,

If you want to wrap this up in a simple way create a lookup field from PO to activity and hide that field in pagelayouts. Because of the two relationships i.e Activity to PO and PO to Activity You can access any field you want..