Toggle Label Based off UDF
AnsweredI'm trying to work out how to toggle a label on the Sales Order screen based on the status of a UDF.
The application is to print a label based of a UDF field with a Yes/No parameter. By default, the UDF equals No and the form will load the label 'Order Confirmation Not Printed'. When the order confirmation is printed, the P&D configuration will do an SQL write to set the UDF to Yes. Next time on form load, the label should read 'Order Confirmation Printed'. Ideally I'd like to include formatting such as a red or green box with white text on these labels.
I've got this working fine based off a validation query calling two UF -> Content Creator -> Labels when you load the form directly. However, when you scroll through orders, you get an error (Item - already exists [66000-13]) as the same label may have been called on the previous record.
Is there a way to clear the labels on form unload so that the correct label can be loaded for the next record?
-
Official comment
Hello Scott,
You have it half way done, yes, you need to create a label with no information or a default text with the Content Creator of if you preffer with the Item Placement Tool (it's easier to do it).
Then, you can use a B1 Validation system on form load that executes a Macro, this Macro will contain a set command that will update the value of the label in the screen.

-
Hi Yaremi,
Thanks for your reply, you definitely pointed me in the right direction.
I wanted to keep text formatting so what I ended up doing was calling two overlaying two boxes (labels) on form load and then using a macro to hide and show them based off the UDF on data load. This toggles them perfectly as you scroll through the documents.
Thanks for you assistance,
Scott
Please sign in to leave a comment.
Comments
2 comments