CA PPM Quick Tips | How to Update a Field through a Gel Script
James Gille, CA PPM Solutions Consultant
Today James Gille, CA PPM Solutions Consultant at Rego Consulting, shows us how to update a field through a gel script. Read his instructions beneath the video player.
Training Video | How to Update a Field through a Gel Script
CA PPM |Update Field Status
For this exercise, we have created a custom object off of the project object called “Project Actuals.” We access it via Home > Portfolio Management > Projects > Akhila Sample > Properties > Project Actuals List > PA000044.
That object will have field called “Status.” It currently reads “New.” We’re going to update that field to a different status: “Processing.” To do so, we’ll use a gel script.
CA PPM |Create a Gel Script
To update the status of our object to process, we’ll create a gel script in the text editor of our choice. This is Notepad++.
You’ll include the name spaces that you need to update a field, which requires including the gel name space for the GEL Tag Library and the SQL name space to update SQL.
Take your copied text back into CA PPM, and create a new process via Administration Menu > Data Administration > Processes > New.
Create a “Process Name” and “Process ID,” like “Update Field” and “update_field.”
CA PPM |Tie a Process to an Object
After you’ve created your new process, tie it to an object via Objects > Add Primary Object > Object Type. Here we select our “Project Actuals” Object.
Save and Return.
CA PPM | Add an Action to a Step
Then we want to add an action to a step, to implement that Gel Script.
So we go to the “Start Step” tab and select New > Custom Script > Next.
Define an “Action Name” for your script. James writes “Execute Script” and his “Action ID” is “execute_script.” We’ll copy that script code into the “Custom Script” field and select “Save and Return.”
Back on the previous page, we need to finish our process by choosing a post condition via Select Step > Finish > Add > Return.
CA PPM | Validation to Activate the Process
Go to the “Validation” tab for the process. Select “Validate All and Activate.” This will activate the process, so that we can now go run it.
CA PPM | Project Actuals Record
We’ll now go back to our project, “Project Akhila_Sample…” On that project actuals record, we’ll select the “Processes” tab and its “Available” sub-tab, check mark our process box, select “Update Field,” and click “Start.”
CA PPM | Finish the Process
Now we’ll go in and finish the process. Note that the “Status” has changed to green, which means our process has finished.
If we go back to the “Properties” tab, we’ll see the “Status” has updated to “Processing.”
Nice work. That’s updating a field through a gel script.
Have an idea for a CA PPM Quick Tip? Tell us about it in the comments.
As the leading PPM, ITBM, and Work Management services provider, Rego Consulting has helped hundreds of organizations achieve a higher return on their software investment, including 60% of Fortune 100 and 70% of Fortune 20 companies.