Updating a field in another table using JavaScript in a RuleSet

I am using Process Designer in HPSM 9.52.

I want to update a field in requestTask A, that field's value be populated into the parent request and then if that value is not null to open request B.

I've used post.fc in format control to post a value to another table.

Has anyone done anything like this in a ruleset?  I've been able to call another table and pull a value already there but can't seem to make it work so I can push / post a value to another table.

  • In the higher versions of Service Manager there is a ruleset that has as property Run Schedule Action on Record. There is also Run Action as a ruleset type.

    I dont know of 9.52 has this functionality, but both those ruleset types are really handy to trigger a save on the parent record.

    If your version does not have this, you can also use the generic Run Javascript rule and call a self made javascript in a scriptlibrary from the workflow. Benefit of the scriptlibrary is that is is easier to test than making javascript directly in the ruleset itself.

  • you can use Javascript in a ruleset

    var task=new SCFile( "<yourtablename>");
    var rq=task.doSelect(" <select condition> "); this one to select your task, try to use parent.id, if you have many tasks use a while loop
    if (rq==RC_SUCCESS){
    do your modifications here
    task.doUpdate(); this for updating the task in the DB