+ Start a Discussion
Lukasz PiziakLukasz Piziak 

Workflow Updating formula.

Hi all,

I have created kind of product configurator app to be able to configure our assembly products from differ components.

I have 2 objects.

1.  Assemblies with 'MAIN_ASSY_HOSE_LENGTH_VOCAB_CODE__c' number field where information about assembly length is stored.
2. Hose Accessories with 'Length_MT__c' number field and 'Hose_Accessories1__c' text field where is name of the product.

 Note: Hose Accessories are in relation with Assemblies as a Master-Detail type.

The condition is:
Copy value from 'MAIN_ASSY_HOSE_LENGTH_VOCAB_CODE__c' field of Assemblies object to 'Length_MT__c' field from Hose Accessories but if the name in field Hose_Accessories1__c' contain 'None' in Hose Accessories field paste value '0.00'

Question:
Is it possible to use workflow with formula for updating field with condition mentioned above?
Please see below the graphical explanation.

Please kindly help :)

Thank you.
User-added image
Best Answer chosen by Lukasz Piziak
ShashForceShashForce
Please try this:

IF(AND(Hose_Accessories__r.MAIN_ASSY_HOSE_LENGTH_VOCAB_CODE__c >0,Hose_Accessories1__r.Name ='NONE'),0.00,Hose_Accessories__r.MAIN_ASSY_HOSE_LENGTH_VOCAB_CODE__c)

All Answers

AmitAmit (Salesforce Developers) 
Please refer following link for more information :

https://help.salesforce.com/apex/HTViewHelpDoc?id=workflow_field_update_considerations.htm&language=en_US
Lukasz PiziakLukasz Piziak
I have used the following formula: 

IF(AND(Length_MT__c( Hose_Accessories__r.MAIN_ASSY_HOSE_LENGTH_VOCAB_CODE__c) >0,Hose_Accessories1__r.Name ='NONE')0.00,Length_MT__c (Hose_Accessories__r.MAIN_ASSY_HOSE_LENGTH_VOCAB_CODE__c ))

Where:

'Length_MT__c' - field to update
'Hose_Accessories__r.MAIN_ASSY_HOSE_LENGTH_VOCAB_CODE__c' - Copy value from this filed to 'Length_MT__c'
'Hose_Accessories1__r.Name' - where if value is None formula should use 0.00 value to update 'Length_MT__c'


But after Syntax check still giving me troubles and don't work..  What is wrong? Is there anybody to help me?

Thanks.

ShashForceShashForce
Please try this:

IF(AND(Hose_Accessories__r.MAIN_ASSY_HOSE_LENGTH_VOCAB_CODE__c >0,Hose_Accessories1__r.Name ='NONE'),0.00,Hose_Accessories__r.MAIN_ASSY_HOSE_LENGTH_VOCAB_CODE__c)
This was selected as the best answer
Lukasz PiziakLukasz Piziak
Thank you Shashank!!!
It is working!!!!
Have a good day :-)