Linked cases within the same case type

Discuss your general Proclaim related queries here.
Posts: 1
Joined: Thu Sep 03, 2020 10:42 am

Linked cases within the same case type

Post by esradral »

Hi All
I really need some help please, I relatively new to Proclaim and still struggling with its quirks.
I'm trying to access the data stored in a table in one case from other cases with in the same case type.
Case type is FR. I manually created a case called FRQuestions and a table called FRQuestionBank to hold a range of questions which relate to other case types.
I set up a link field - QuestionsLink - using the FR case number. I can access the field data from the FRQuestions case in other cases with in FR, eg FR10.
What I want to be able to do is use the FRQuestions.FRQuestionBank table as a single source of questions and then from other cases eg FR10 grab data from the FRQuestions.FRQuestionBank table (based on a tableslect pertinent to FR10 - would be diferent questions for different cases).

I can swap normal field data between from FRQuestions to FR10 no problem but I can't seem to access FRQuestions.FRQuestionBank. FR10 can only see its "own version" of FRQuestionBank.
I've used "input table details" and it shows FRQuestionBank as a linked table via my QuestionsLink but again FR10 can only see its own version of FRQuestionBank. Do I need some sort of table command in my linked action to force the link?

This is the code i'm using in a linked action and run from e.g. FR10.

Code: Select all

vThisCase = {case.key} 
#MESSAGE( "thiscase = " , vThisCase , NEWLINE , "Qcase = " , vQcase ) 
IF vQcase = vThisCase THEN 
    MESSAGE( "cannot run this in this case" )  
    MESSAGE( "ok to run this" ) 
    UPDATE( vThisCase , "" ) 
    UPDATE( vQcase , "" ) 
    PUT( vQcase , {Questions Link.Link Case Ref} ) 
    PUT( vThisCase , {Questions Link.Questions Link.Link Case Ref} ) 
    UPDATE( vQcase , "UNLOCK" ) 
    UPDATE( vThisCase , "" ) 
    # MESSAGE( "link: " , {Questions Link.Link Case Ref} ) 
    #MESSAGE( "link link: " , {Questions Link.Questions Link.Link Case Ref} ) 
    result = TABLECOUNT( {Questions Link.FR Question Bank.Table} ) 
    MESSAGE( result ) 
It returns a record count of 2 which is the number of records in FR10.FRQuestionBank. To check, I added another record to FR10.FRQuestionBank and the LA returned 3 records.
FRQuestions.FRQuestionBank has 11 records.

Am I making sense? Is it even possible to do this?
I'd appreciate your advice - many thanks.