Table Component Row Update through RuleUtil.setField
We all know that request fields can be updated with JS rules through JS function like -
above rules works fine when it comes to updating field on the request form.
I am trying to update a first row of a table component though the same method and it doesn't work.
I don't want to call any procedure or move away from workflow step. I am trying to call JS function before transition and this doesn't work.
Summary - Request Form fields gets updated however table component row/column fields don't.? Any clues how to do it?
Your expression looks correct according to https://admhelp.microfocus.com/ppm/en/latest/Help/Content/RG/CmdTokVal/102200_CmdTokVal_4UseToken.htm ; I assume you can read the TC column field alright, but cannot set it, is it correct?
I'm not sure whether setField( ) works when setting table component fields.
Does the first row of the TC already exists when you're trying to set the value, or do you have an empty TC when the rule is fired?
You are correct. I can't set it.
Does the first row of the TC already exists when you're trying to set the value, or do you have an empty TC when the rule is fired? - [ I have First row exist and saved on the form]
I cannot help with Table Component question - more research is needed. But in regards to setting Parameter and Visible Parameter using RuleUtil.setField there are two things to keep in mind:
1. If your validation is TEXT, then both parameter and visible parameters will be set to the same value (like in regular PPM operation).
2. If your validation has code and meaning, then all you need is to pass CODE, the meaning will be derived automatically. For example: If my validation has the following values:
Then use: RuleUtil.setField('[TOKEN]', 'IN_PROGRESS', '');
The results will be: parameter will be set to IN_PROGRESS, and visible parameter will be set to OPEN.
Hope this helps.