Issues with Visibility options when Adding records

Context

I have built a Sales Order App and my client is currently testing it. Sorry for this long winded context but I think its important to understand what I’m trying to do.

The Client has two types of Order a Trade Order or a Commission Order and deliveries are processed slightly differently for each type. In every case a Delivery Note is received that the system must record (in a Delivery Note table)
1. When a Trade Order delivery is received, the Delivery Note is specific to a Purchase Order (raised earlier in the system) and the Delivery Note can only record deliveries for Order Items that were on the Purchase Order so the user must be restricted to only selecting the items on that PO
2. When a Commission Order delivery is received the Delivery Note can have any of the Order Items on it so the user must be able to Add any Order Item to the Delivery Note

Delivered Items are recorded in a Deliveries table which is related to the Delivery Note.

I have encountered an issue when building the form to add Deliveries to the Delivery Note which is able to deal with both use cases above.
I have a Collection with the Related Deliveries in the Delivery Note detail screen. When I click the Add Item button I want to set the visibility of two Choice components (which are working fine) on the Add form based on the Type of Order that is being processed.
1. Choice component only show the related Purchase Order items
2. Choice component shows the option to add any Order Item

When I build the form I can reference values from the Delivery Note on the screen including the Order Type (see screenshot - in this case a Trade Order)

But when I try to set Visibility for the Choice components, I am unable to reference those values. I can only reference the delivery item values which is pointless because they haven’t been set yet as the record has not been created so all the references are blank (see below)

I’m working around this by setting a variable in the User table to the Order Type when they enter the Order but I cannot figure out how to implement this visibility from the data on the Screen / Delivery Note and its beginning to drive me nuts. I’ve tried all sorts of things including custom Actions but to no avail. Interestingly when I try to invoke an action on Deliveries from the Title Bar Action only “Delivery Note” actions are available to me, not actions related to Deliveries.

Has any one encountered this limitation before and have some kind of workaround other than the way I am currently hacking it?

Ya…it wa hard to follow exactly your context, but I have certainly encountered issues with attempting to set visibility conditions on choice components in a form. The visibility can only reference the destination table, not the source table, which isn’t very intuitive. Setting it to screen > value does nothing either (though I feel it should). I’ve raised this in the past but nothing was done about it.

Hi Robert, yes it was a bit of a complicated context but thanks for persevering and replying!
I’ve managed to overcome this by creating two buttons in the Delivery Note detail screen with their visibility set based on the Order Type.
Each button opens a “New Screen” as an Overlay based on the Delivery Note
I’ve then added a Form Container to that screen to populate the Delivery information.
Then I’ve added a custom action to the Submit button to process some logic and close the Overlay
Essentially I’ve built two separate but almost identical screens and used the button logic to show or hide the buttons based on the Order Type and this seems to work nicely (see below)

image

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.