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?
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.
User | Count |
---|---|
40 | |
34 | |
29 | |
23 | |
17 |