web-servicessage-erp

X3 L4G : Removing value of list in Webservice


Not sure wether this is the right place to ask, but there's very few technical information available online. I'm building a webservice on Sage X3 V6 which is designed to fill several fields in a form (kind of input user emulation that X3 uses to update data including validity checks as if a human was doing the job). My issue is that I could not find how to just empty a list... I tried lots of different values and nothing worked. All fields are populating correctly except the list when I try to empty it. Below is an extract of the code.

WW_ACTION = "MODIFY"    : # Action (READ, CREATE, MODIFY, DELETE, SUPLIG, INSLIG)
WW_IDENT  = [L]BPCNUM   : # Data key 

# Setting values (YVISCLT is the name of the select field)
[L]YVISCLT = ""
[L]BPRNAM_B = [L]BPCNAM
[L]BPRLOG_B = [L]BPRLOG
[L]CRN_B = [L]CRN
# ...

# Calling update
Gosub WEBSERV From =YWSBPC

Does anyone know how to proceed ? Thanks in advance


Solution

  • Well, seen with the editor, the issue has already been raised in the past but still not fixed under V6. Obviously no choice but running another update for select fields you whish to clear (L4G example for an alphanumeric field) :

    If [L]LOCALVAR = "<anything to tell you wish to clear the value>"
        [BPC]MYFIELD = ""
        Rewrite [BPC]
    Endif