"Get" Function |
![]() ![]() ![]() |
Get function locates the first item node in the given ADOM that satisfies the where-expression specified and retrieves the values of the its sub nodes. Syntax: Get(adom-scope:adom-name, adom-subnodes, target-fields, where-expression)
adom-scope The scope of the ADOM. Values are "r" Request, "s" Session and "a" Application
adom-name The name of the ADOM.
adom-subnodes The names of the ADOM sub nodes whose values to be transfer to target fields. If no source specifier is given for a symbol, the source is searched in "a:", "f:", "v:" and "i:" order. target-fields The names of the target fields to transfer the values into. If no target specifier is given for a symbol, the target is searched in "f:", "v:" and "i:" order.
where-expression The expression that is tested against each item node of the ADOM till a match found. If no source specifier is given for a symbol in the where expression, the source is searched in "a:", "f:", "v:" and "i:" order ;
Examples: Get(s:cart, [v:NAME, v:PRICE], [NAME, PRICE], ID = f:ID) Locate the item node whose sub node ID has a value that equals to process block field ID and transfer the values of sub nodes NAME and PRICE to pool variables NAME and PRICE. Get(s:cart, *, *, PRICE < 100) Locate the first item node whose sub node PRICE has a value less than 100 and transfer all its sub nodes to identically named process block fields. Get(s:cart, v:*, *, QUANTITY = 1) Locate the first item node whose sub node QUANTITY equals to 1 and transfer all its sub nodes to identically named pool variables. |