In this post I am going to provide answer to a popular question asked in siebel interviews. It is realted to configuation and here is how it goes.
How to update a field based on change in another field?
The answer to this question is.
- Scripting
- On Field Update Set n user property. (This is the answer interviewer is looking for though)
Explanation:
Scripting:
You can write script on SetFieldValue event of buscomp to update the target field. But the problem with this solution is if user UNDO the record then your script won’t revert back the changes that it has done.
One more solution can be to check in SetFieldValue event if that field is being updated through global flag and then on WriteEvent of buscomp execute your script only if that flag is set to true. But again you will have to set global flag to false may be Delete event (this is fired when user undo the record).
These solutions by scripting are really cumbersome. So we generally use On Field Update set n User property for this kind of requirement.
On Field Update Set n:
As the name suggests that this user property is used to set value of another field when a particular field is updated. In this user property n is the incremental number which is 1 more than the number used in the last On Field Update Set user property.
Value:
The value of the On Field Update Set user property consists of three quoted parameters separated by a comma and a space which is as following “FieldToCheck”, “FieldToSet”, “[Value]“
Example:
You want to set TargetField with SourceField value whenever SourceField is updated. So you will specify it like this.
Property: On Field Update Set 1
Value : “SourceField”, “TargetField”, “[SourceField]”
You can also make use of expression in the Value that you specify.
Example:
“SourceField”, “TargetField”, “[SourceField] + [AnotherField]”
Your invaluable comments are always welcome

(7 votes, average: 4.57 out of 5)
14 Comments at "On Field Update Set n – Interview Question."
I really liked your site.. Keep updating it.
It is interesting.
More detail answer is available at http://blog.stuandgravy.com/2007/03/26/siebel-interview-question/
if the fields are picklists,then beleive we can use the logic of implementing it via Hierarchical picklist..Which should also help in achieveing the same.
I really liked your site.. Keep updating it.
It is interesting.
It is very good explanation, it will be more helpfull for quick regference when an example is given.
Hi,
just sharing another example regarding the same user property.
Property: On Field Update Set 1
Value : “SourceField”, “TargetField”, “[SourceField]”
you can give expression in the value field as mentioned :
eg : “Street Address”,”Address Name”,”IIF([Address Name Locked Flag]=”"N”",[Calculated Address Name],[Address Name])”
You can also give the on field update user proprty in a nested way.
-deepak
that’s new thing… thanks for sharing
We have a requirement as in the applet level we have a button called “Released” and we have two fields called “Released by” and “Released Date”.
Once the user (XYZ) click the “Released” button, That two fields gets updated automatically like Released By = XYZ and Released Date = dd/mm/yyyy.
For this scenario we can go for scripting but we need to done with User Property.
If any idea from your end please share with us.
I think you can do it with combination of user property and scripting.
you can write the following script.
if(MethodName == “Released”)
this.SetFieldValue(”Release By”,”XYX”)
return(CancelOperation);
and have a userproperty at Release By to set Released Date.
As you have to write script to return cancel operation then it shouldn’t be much issue to add one more line.
Do let us know how you did it though?
Really a very good site…………..
Hi Neel and all,
There is a user property called “Change Field”..In Bookshelf info is not enough to understand how this works.Please thorugh ur views about this If any one knows..
Thanks
HI Neel,
Following can be used for the problem told by Bhavan.
User Property:Named Method
No need of scripting. Let me know if I need to elaborate this.
Hi Neel… i had one problem with this On Field Update Set.
whether it will work for LOV’s….???
For eg: consider i need to check a field named “Status” and need to update a field named “Sales Status” but both field are LOV’s. How this User Property will work..??
i used this value but it didnt work.
“Status”,”Sales Stage”,”05–CLOSED”,”[Status]=”Rejected”"
Hi Karthik, User Property should work in your case too..May be would like to check the syntax or the sequencing of the user property.
I believe you can also achieve the same using the High Low and Parent field in LOV..
NS
[...] The most common use of this event is to set value of another field based on some logic or conditions that is not possible through user properties like On Field Update Set n. [...]
Comment Now!