Form Presentation Question

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
ab042
Posts: 326
Joined: Mon Jul 17, 2006 4:11 am

Form Presentation Question

Post by ab042 »

I'm trying to CREATE an ORDER type form and would like there to be a table with 6 BLANK line items displayed for editing in place of the ONE item that is currently displayed.

Under visual element I have it set Display as a Table of Items and the SHOW 6 items but when you creating a new order it only shows ONE line item and then you have to click on ADD LINE for each additional.

Is there anyway to change this to show more blank lines on the form when starting and then if the user only completes two or three and clicks finish just don't save the undefined lines?

Or maybe I could create a routine to add 6 blank lines before showing the order lines and then after its completed delete the blanks from the order.

Any suggestions or samples?
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

Yes, you can pre-create line items when initializing the order and discard blank ones when the order is created. To create line items during order initialization, add a rule like this to the order object:

If ClientOrder.LineItems IS UNDEFINED Then
CREATE LineItem FOR EACH NUMBER BETWEEN 1 AND 6 WITH LineItem.Order = ClientOrder

To delete blank line items when the order is created, add a two-action rule like the following to the order object:

If ClientOrder IS NEW Then
FIND LineItem WHERE LineItem IN ClientOrder.LineItems AND LineItem.Quantity IS UNDEFINED
DELETE LineItem
Aware IM Support Team
Post Reply