Expression is removing the add action for both true and false

Hi 

I have a view shows the reference cords.  I want to hide the Add link based on the status, which I have written an expression in system generated Add action but it is miss behaving. 

I have a Status called Red and Green which is a Field Type Color. Add link should appear only when the status is "Green" but it removes it.

Sekhar_2-1662660813272.png

Here is the expression result for the same record showing True.

Sekhar_3-1662660960853.png

Solved Solved
0 9 160
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

The system Add action cannot use references to columns of the current row: the Add action is "not a row-level action".

In order to accomplish what you want, you will need to create a read-only slice on the Items table, add another column to the parent table with an App formula expression of [Related Items] and the read-only slice as the referenced table, then use Show? expressions to hide the original Related Items column and show the alternate column that uses the read-only slice.

View solution in original post

9 REPLIES 9

How do you know that the row displayed in the Test results is the same as the one shown in the "Bill Details" view?

Make sure that the action you are looking at is the correct one.  It should be the system action for the table that represents the Items list.

Also, if you could, show us the definition of the InventoryID column in the Items table and definition of the [Status] column in the Bill Details table.

Thank you. It is the inventoryID which is a primary key and reference key on the items table. The test results show the correct InventoryID . Here is the data from the table which is showing Bill Details

Sekhar_0-1662667843722.png

Data from Items table

Sekhar_1-1662668081330.png

Definition of the InventoryID column in the items table

Sekhar_2-1662668500944.png

Sekhar_3-1662668568819.png

Definition of the Inventory table which is showed in the Bill Details View.

Sekhar_4-1662668713626.png

 

 

 

 

 

 

 

 

 

 

There is something strange about the Formula you have for the [InventoryID] in the ItemsBySite table.  It has a reference to itself that shouldn't be there.

I was experimenting something before. Just removed the Formula there. Seems no affect on the result.  

Plain "True" or "False" works instead of a formula but put any expression simply not working for me. Don't know why. 

Ok, test to see if the expression is doing anything.  Change the = "Green" to <> "Green".  

If the button then DOES show, it means the expression IS being evaluated and for some reason it thinks the [Status] column doesn't match with "Green".  Then it's just a matter of figuring out how and where the [Status] value is coming from.

I am also wondering if for COLOR column type if the color value needs to be UNquoted??  Not sure on that.

Thank you.

Changing the = "Green" to <> "Green" does show the button, that mean it is evaluating the expression.   I've tried unquoted and changing the status column to text with no success. 

Steve
Platinum 4
Platinum 4

The system Add action cannot use references to columns of the current row: the Add action is "not a row-level action".

In order to accomplish what you want, you will need to create a read-only slice on the Items table, add another column to the parent table with an App formula expression of [Related Items] and the read-only slice as the referenced table, then use Show? expressions to hide the original Related Items column and show the alternate column that uses the read-only slice.

Excellent. Worked out very well. Thank you.

 

Top Labels in this Space