Adds a new item set as a parameter to a variable based on a Business Component collection.
Is a variable based on a Business Component that is a collection.
Is a variable based on the same data type of the collection but corresponds to only one instance.
Consider the following two-level Transaction set as a Business Component:
AttractionId* (Autonumber property = Yes)
that contains the following defined rule:
Suppose you need to add a new ticket to the attraction whose AttractionName = Eiffel Tower.
To do so, define in a certain object (for example in a Web Panel object, Panel object or a Procedure object):
- An &Attraction variable based on the Attraction data type.
- An &AttractionTicket variable based on the Attraction.Ticket data type.
After that, in the context you are positioned (for example, in the Events section of a Panel object or in a Procedure source) write the following code:
&Id = Find(AttractionId,AttractionName="Eiffel Tower",0)
&AttractionTicket = new()
&AttractionTicket.AttractionTicketDescription = "Vip"
&AttractionTicket.AttractionTicketPrice = 200
Read the article titled Business Component InsertOrUpdate method that presents another way to meet the same need.
Business Components Methods