Modify the behavior of an add action

Hello Community

I have a problem that I can't solve or understand:
I have 2 tables, one for the Order and the other with the Items of the Order.
I want that, when a certain condition is met, the order cannot be edited, neither edited nor added more items related to that order.
In the Orders table I created a virtual column Y/N that determines the condition.
In the behavior section, in the section: "Only if this condition is true" I put that column (referenced by the Order Id in the items table). Indeed, neither the order nor the items can be edited, but in the list of related inline items, the ADD option still appears.
I then created another virtual column in the Items table that references the condition in the Orders table.
Suspecting that it is not in the context of a row (although the warning does not appear), I did a Select of the condition in the Orders table, I also put it as a child table, and there is no way. Now if I put FALSE hardcoded, the ADD option is not shown.
What is wrong?
I don't understand why it doesn't work.
I did another test, I added a slice controlled by the condition, and when I click ADD it passes me the Order Id (without reference, since it does not exist in the slice) which implies that it IS in the context of the row.
I am puzzled!
Some help?

Solved Solved
1 1 88
1 ACCEPTED SOLUTION

Please try below.

1. Create two slices on your child table ( Items of the order") -

      A. Make this slice to have       updates/adds/deletes enabled. Create a reverse reference column based on this slice in the parent Orders table. In the show_if of this reverse reference column , insert your virtual column expression (Y/N) that evaluates to TRUE

       B. Create one more slice with only read-only permission enabled. Create a reverse reference column based on this slice in the parent Orders table. In the show_if of this reverse reference column , insert your virtual column expression (Y/N) that evaluates to FALSE

View solution in original post

1 REPLY 1

Please try below.

1. Create two slices on your child table ( Items of the order") -

      A. Make this slice to have       updates/adds/deletes enabled. Create a reverse reference column based on this slice in the parent Orders table. In the show_if of this reverse reference column , insert your virtual column expression (Y/N) that evaluates to TRUE

       B. Create one more slice with only read-only permission enabled. Create a reverse reference column based on this slice in the parent Orders table. In the show_if of this reverse reference column , insert your virtual column expression (Y/N) that evaluates to FALSE

Top Labels in this Space