Add an existing Correspondent to a table on a different Case Type  [SOLVED]

Discuss your general Proclaim related queries here.
coastal_living
Posts: 35
Joined: Mon Sep 27, 2021 11:58 am
Has thanked: 12 times

Add an existing Correspondent to a table on a different Case Type

Post by coastal_living »

I have successfully navigated the ability to add an existing Correspondent to a Case when a new Case is created - if there is only 1 type of that particular Correspondent, as per below:

Code: Select all

 PUT( "81623" , {Probate Link.Probate Registry.Correspondent index} ) 
My next hurdle is how to write some maths to pick up an existing Correspondent and add it to a Correspondent table on a different Linked Case. I have the Name Code (Index Number) of the Correspondent and I know the maths to add records into the table, if the maths is run within that Case Type - but I can't figure out what the maths should be when it's run on a different Case Type?

I have tried the following, but Proclaim doesn't like it! It just freezes and I have to force Proclaim to close.

Code: Select all

TABLECREATE( {Probate Link.DWP Correspondent Table.Table} ) 
PUT( "2467681" , {Probate Link.DWP.Correspondent index} ) 
TABLESAVE( {Probate Link.DWP Correspondent Table.Table} ) 

galexander
Posts: 67
Joined: Fri Jul 25, 2014 8:22 am
Location: Manchester
Has thanked: 2 times
Been thanked: 6 times

Re: Add an existing Correspondent to a table on a different Case Type

Post by galexander »

Hi
Yes I found the same issue and the best I could do was:
- populate a global variables with correspondent index
- set up some maths in the target case type which will update the table with the global variable value
- run this linked maths from your source code

coastal_living
Posts: 35
Joined: Mon Sep 27, 2021 11:58 am
Has thanked: 12 times

Re: Add an existing Correspondent to a table on a different Case Type  [SOLVED]

Post by coastal_living »

Hi, thank you. Yes, it appears that the Proclaim rules do mean that you cannot pass data into a table from a different Case Type - but I can of course run a maths field on the other Case Type, and that maths field can hold the logic to populate the data into the table. I basically did this in the end:

Code: Select all

 v-run = {Probate Link.M Populate Correspondent Tables.Text} 
Then in that maths field it does what I need.....

Code: Select all

TABLECREATE( {DWP Correspondent Table.Table} )
PUT("2467681", {DWP.Correspondent index} )
TABLESAVE( {DWP Correspondent Table.Table} )