LIINKTOFORM() from parent table to child table with parent-key

Hello everyone,

I have two tables:

Table nameTable key
Casescase_id
Case_Step1case_step1_id

The Case_Step1 table has a column "case_id" which is type "Ref" and marked as "is a part of". Each item of the Cases table should only have one related Case_Step1 item.

I created an action in Cases table, which should link to a form of Case_Step1.
If there is no Case_Step1 item for the specific Cases item yet, I want to link to a form create a new item inCase_Step1, with the same "case_id" I'm performing the action from, and create a new "case_step1_id".
If there is already a Case_Step1 item for the specific Cases item, I want to link to the form with the existing Case_Step1 item, with the same "case_id" I'm performing the action from, and the related "case_step1_id".

I tried the following action-code in the Cases table, but this is not working.
If there is no Case_Step1 item related to that case_id, it is creating a new one.
If there is a Case_Step1 item related to that case_id, I get the following error message: "There is already a row with the key...".

 

LINKTOFORM(
"Case_Step1"
, "case_id", [case_id]
, "case_step1_id", FILTER("Case_Step1", ([_THISROW] = [case_id]))
)

 

I would be happy if you can support with that ๐Ÿ™‚

Solved Solved
0 2 138
1 ACCEPTED SOLUTION

LINKTOFORM is only for creating new records. Use LINKTOROW instead to go to the form view of an existing record. Set up the target of your action to something like this:

 

IF(
  ISBLANK( FILTER( case_step1 , .... ) ) ,
  LINKTOFORM(...) ,
  LINKTOROW(...)
)

 

 

View solution in original post

2 REPLIES 2

LINKTOFORM is only for creating new records. Use LINKTOROW instead to go to the form view of an existing record. Set up the target of your action to something like this:

 

IF(
  ISBLANK( FILTER( case_step1 , .... ) ) ,
  LINKTOFORM(...) ,
  LINKTOROW(...)
)

 

 

Thank you so much. Works great.

Top Labels in this Space