Highlighted
Trusted Contributor.
Trusted Contributor.
664 views

Cascade Update Example - Need Help

Jump to solution

Tailoring help topics for printing manual

In this pdf document, it mentions a cascade update example like the one below:

For example, incident records are linked to the contacts table by the contact name (probsummary,
contact.name = contacts, contact.name). If someone were to edit the contact record and change
contact.name, the associated incident records would lose their link and become orphaned. You could set
up a Cascade Update record to monitor the contact.name field in contacts and change the
contact.name field in related incident records to match accordingly

Can someone please give me an example with screenshots on what goes where with the Cascade update as well as the corresponding Trigger that goes with it?
I'm trying to have Service Manager update a contacts information in the probsummary table (Incidents) if I have to change a last name. 

I've tried looking around the Service Manager tool to see if I can re-create it and I'm unsuccessful at this point. I need to get my momentum back up and conquer this modification. Can anyone provide assistance to fuel this S.M. train so we can get it to the station?

Thanks.

 

------------------------------------------------------------------------
Speed, Momentum, Intensity ... Never stop never stopping.
------------------------------------------------------------------------
0 Likes
1 Solution

Accepted Solutions
Highlighted
Super Contributor.. Super Contributor..
Super Contributor..

Re: Cascade Update Example - Need Help

Jump to solution
we just recently ran into this so we documented the process that we used - hopefully this will work for what you are wanting to do
 
 
1. Find a contact that you would like to update that has a few incidents attached to the user. I have created a user called 'Test User' for this example.
 
2. Write down an incident # that you will reference later. I have created a test ticket with the Incident # of IM10224.
 
3. Next create your trigger. See attached picture1.png
picture1.png
 
4. Create the corresponding Cascade Update. See attached picture2.png
picture2.png
 
5. Now open up the contacts search form and find the contact that you have selected in step 1. For this case we will use 'Test User'. See attached picture3.png
 
   a. Change his name to 'Test User New' and you should see some changes take place under the button bar.
   b. Now click ok to close out the contacts form.
 
picture3.png
 
6. Open up the 'Search Incidents' form. See attached picture4.png
   a. In the 'Incident ID' input, put the Incident # that you wrote down in Step 2. This example has an ID of IM10224. 
   b. Look at the 'Request By:' input and it should reflect the changes that were made in Step 5. 
 
picture4.png
 
* Note the Cascade Update most likely has to be nick-named after the table you want the changes to reflect in. (That is how I've had my success happen)
 
* Also, after you make the trigger and cascade update for the update you would like it to do, MAKE SURE you click out/close out of each trigger/cascade update record so that it will actually save to the server. Then jump into the Incident record to see the changes.

View solution in original post

3 Replies
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: Cascade Update Example - Need Help

Jump to solution

The cascade update is started through an update or delete trigger (table: triggers)
The generic application to call is: cascade.update.wrapper

A Cascade Update record (table: cascadeupd) has:

Name: Source Table Name
Type: Either "Update"  or  "Delete"  -  govened by the type of trigger that called the process.
Execution Condition: The condition to execute this rule in general (default is: "true")
Update Type: What should happen to the targeted records.
Then there is a recurring set of settings group in a notebook with 3 tabs ("Main", "Expressions", "Javascript") for each target table.
Main_Taget File: table name where records that need to be updated or deleted reside
Main_Execution Condition: Condition to execute the delete/update against this table
Main_Description: Personal free to choose clarification of step
Main_Adv Query: A specific query to select records in the target table, if it shouldn't use a "source.key = target.key" query)
Main_Source Key: The field name in that original record that holds the value from the target table
Main_Target Key: The field name in the target record that holds the value aligned to the source record
Main_Source Fields / Target Fields table: Field Value from Source that populated Target Field in Target record

Expressions: Area to use RAD expressions against $L.target, using $L.old or $L.new as references to the previous or current version of the source record.

Javascript: Area to use Javascript against system.vars.L_target, using system.vars.L_old or system.vars.L_new as references to the previous or current version of the source record.

 

Hope this helps!

 

 

 

0 Likes
Highlighted
Super Contributor.. Super Contributor..
Super Contributor..

Re: Cascade Update Example - Need Help

Jump to solution
we just recently ran into this so we documented the process that we used - hopefully this will work for what you are wanting to do
 
 
1. Find a contact that you would like to update that has a few incidents attached to the user. I have created a user called 'Test User' for this example.
 
2. Write down an incident # that you will reference later. I have created a test ticket with the Incident # of IM10224.
 
3. Next create your trigger. See attached picture1.png
picture1.png
 
4. Create the corresponding Cascade Update. See attached picture2.png
picture2.png
 
5. Now open up the contacts search form and find the contact that you have selected in step 1. For this case we will use 'Test User'. See attached picture3.png
 
   a. Change his name to 'Test User New' and you should see some changes take place under the button bar.
   b. Now click ok to close out the contacts form.
 
picture3.png
 
6. Open up the 'Search Incidents' form. See attached picture4.png
   a. In the 'Incident ID' input, put the Incident # that you wrote down in Step 2. This example has an ID of IM10224. 
   b. Look at the 'Request By:' input and it should reflect the changes that were made in Step 5. 
 
picture4.png
 
* Note the Cascade Update most likely has to be nick-named after the table you want the changes to reflect in. (That is how I've had my success happen)
 
* Also, after you make the trigger and cascade update for the update you would like it to do, MAKE SURE you click out/close out of each trigger/cascade update record so that it will actually save to the server. Then jump into the Incident record to see the changes.

View solution in original post

Highlighted
Trusted Contributor.
Trusted Contributor.

Re: Cascade Update Example - Need Help

Jump to solution

Jeff, 

That reply was unreal along with the accompanying photos that you have attached!!! 

Keep that momentum train going!!!

Kudos and an accepted solution for you good sir. 

Mucho appreciado

------------------------------------------------------------------------
Speed, Momentum, Intensity ... Never stop never stopping.
------------------------------------------------------------------------
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.