Hello everyone,
I have two tables:
Table name | Table key |
Cases | case_id |
Case_Step1 | case_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! Go to 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(...)
)
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.
User | Count |
---|---|
25 | |
14 | |
4 | |
3 | |
3 |