0

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

nicolas
  • 712
  • 4
  • 15
  • It seems that you are using an "object" web service ? – Jalil Nov 25 '14 at 08:19
  • Actually I'm using a 'run' on a standard WS which uses an Object Webservice. As lots of modifications you can do with the X3 interface cannot be made by using the WS I firstly run the object WS subprog and then I run the manual updates that could not be achieved in the first step (See my answer below). A bit odd but I've been advised to do so by someone more comfortable with L4G than I... However if you have a better solution I would be glad to hear about it :) – nicolas Nov 27 '14 at 00:50
  • Actually, we've come to avoid using "Object" type web services in X3. We've had a lot of problems, complications and limitations with them. Now, we mainly use "Sub-program" type web services. Less automated (you have to write your own SubProg), but more control (you can do whatever you want). – Jalil Nov 27 '14 at 11:55
  • Yes, it seems to be the only safe way. Hope they have made improvements with V7. Didn't checked yet. – nicolas Nov 27 '14 at 12:47
  • I didn't here anything about web services ... But I didn't get the details neither ... – Jalil Nov 27 '14 at 12:52

1 Answers1

0

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
nicolas
  • 712
  • 4
  • 15