getFirstProperty macro

Use this macro to get the first Property the UserArea.

long getFirstProperty()

Return value: the xml node of the first property in the UserArea or 0 if the UserArea is empty.

Example:

domain  tcskll  skill.code
long    property.node
string  property.name(50)
long    ret        
property.node = getFirstProperty()
while property.node <> 0
    property.name = getPropertyName(property.node)
    if property.name(1;5) = "skill" then
        skill.code = getPropertyValue(property.node)
        if not isspace(skill.code) then
            |* Assign skill to employee
            select  tcppl020.skll
            from    tcppl020
            where   tcppl020.emno = :bpmdm001.emno
            and     tcppl020.skll = :skill.code
            as set with 1 rows
            selectdo
            selectempty
                ret = dal.new.object("tcppl020")
                dal.set.field( "tcppl020.emno" , bpmdm001.emno )
                dal.set.field( "tcppl020.skll" , skill.code )
                ret = dal.save.object("tcppl020")
                if ret <> 0 then
                    dal.set.error.message(sprintf$(
                         "@Cannot add skill %s to employee %s",
                         skill.code, bpmdm001.emno))
                    return(DALHOOKERROR)
                endif
            endselect
        endif
    endif
    property.node = getNextProperty(property.node)
endwhile