LinkToFilteredView in App Conditional always chooses the false condition

I have an invoices application. The Invoice view shows a table of the Invoices, and each row contains a reference to the view of the items contained in that invoice. This reference is working as expected, however, I want to modify the reference view to be read-only if a value in the Invoice is set to Y.

I built two views on Invoice Items. The first view is a ref table view, based on Invoice Items source table, which allows Updates, Adds and Deletes. I named the view โ€œInvoice_Item_Editableโ€. The second view is a ref table view, based on a read-only slice of the Invoice Items source table. I named this view โ€œInvoice_Item_Uneditableโ€.

I would like to show the editable or read-only view, based on whether the parent Invoice row is โ€œLockedโ€.

On the Invoice table, I have a Y/N value field and I also have an App (virtual) column with the following code:

IF([_THISROW].[invoice_locked_by_google_admin] = โ€œNโ€, LINKTOFILTEREDVIEW(โ€œInvoice_Item_Editableโ€, [invoice_invoice_id] = [_THISROW].[invoice_id]), LINKTOFILTEREDVIEW(โ€œInvoice_Item_Uneditableโ€, [invoice_invoice_id] = [_THISROW].[invoice_id]))

At runtime, the Invoice view is presented, and the reference column appears as expected with the list-url image in each row. However, no matter if I pick a row with a Locked value of N or Y, the last view mentioned in the App virtual column code is always the view that is derived at runtime.

Iโ€™ve tried changing the condition from โ€œNโ€ to False, and Iโ€™ve tried reversing the logic to put โ€œYโ€ or True first, but it makes no difference.

Is this a known bug, or am I going about this the wrong way?

0 2 301
2 REPLIES 2

Steve
Platinum 4
Platinum 4

Try changing this:

[_THISROW].[invoice_locked_by_google_admin] = โ€œNโ€

to this:

[invoice_locked_by_google_admin] = โ€œNโ€

IF([invoice_locked_by_google_admin] = โ€œNโ€, LINKTOFILTEREDVIEW(โ€œInvoice_Item_Editableโ€, [invoice_invoice_id] = [_THISROW].[invoice_id]), LINKTOFILTEREDVIEW(โ€œInvoice_Item_Uneditableโ€, [invoice_invoice_id] = [_THISROW].[invoice_id]))

This worked! Thank you!

It would be extra cool if I could also change the icon from list-url (editable) to alt-lock (uneditable). I donโ€™t suppose thatโ€™s possible? Not a big deal, but it would cool.

Top Labels in this Space