6 Replies Latest reply: Aug 10, 2012 10:42 AM by Barry Lindstrom RSS

Webservice Set Action - for only some of the fields

Barry Lindstrom

We have a WSDL that allows 10 fields to be updated.

However, when a user consumes the Webservice and only wants to update 2 or 3 of the fields,

the other fields in the WSDL still update the target record with a NULL value.

We have tried various combinations of Nillable and Min Occurs on the Webservice Definition,
but despite the implication in Remedy's documentation, these settings seem to have no effect whatsoever.

 

We have been told by some of our users that they can use this WSDL IF they dynamically create the WSDL consumption transaction

with ONLY the fields they wish to update.  While this is certainly a workaround that puts the onus on the consumer of the WSDL,

it would be nice if they could pass all ten fields, but only provide values for the ones they truly wish to update.

 

Is there a way to tell Remedy to only update the fields with values and leave the rest alone?

 

See you at WWRUG!!

Barry

  • 1. Re: Webservice Set Action - for only some of the fields
    Misi Mladoniczky

    Hi,

     

    Setting a field to NULL is still setting a field.

     

    The normal client checks which fields to send to the server, and if a field is untouched, it is not sent at all.

     

    You may need to create a filter for each of the 10 field that brings the database value up to the transaction if the value is set to NULL by this specific WebService.

     

    Execute On: Modify

    Run If: ('WebService-10-Fields-Exec' = "Yes" AND 'Field3' = $NULL$ AND 'DB.Field' != $NULL$)

    Set-Fields: From Form ('1' = $1$)

      Field3 = $Field$

     

            Best Regards - Misi, RRR AB, http://rrr.se

  • 2. Re: Webservice Set Action - for only some of the fields
    LJ LongWing

    I agree with Misi.  If Remedy didn't handle it this way, then what method would you have to 'null' a value that currently contained a value that you didn't want to contain anything.  As he also said, most clients will 'remove' the elements that aren't being set from the XML before sending.

  • 3. Re: Webservice Set Action - for only some of the fields
    Barry Lindstrom

    Thanks Misi, this may just do the trick.

  • 4. Re: Webservice Set Action - for only some of the fields
    Barry Lindstrom

    I disagree, there SHOULD be a setting for each field OR a Keyword that can be entered in the field, that would tell the system to IGNORE this field update.

     

    I recognize that this is just not the way it is done and that putting the onus on the consumer to only send that which they want to update is the accepted practice, but just because that's the way it is, doesn't mean there aren't more effective means of solving the problem.

     

    Having said that, I believe Misi has provided a viable workaround that may well solve our problem

  • 5. Re: Webservice Set Action - for only some of the fields
    Misi Mladoniczky

    Hi,

     

    What you can also do is to add one display-only-check-box-fields for each of the 10 fields that says:

    'UpdateFieldX' = No

    'UpdateFieldY' = No

    ...

     

    Then a bunch of FLTRS like this:

    Execute on: Modify

    Run if: ('UpdateFieldX' = "No")

    Set-Fields: from the same form ('1' = $1$)

      FieldX = $FieldX$

     

    The good thing with this is that you can actually set fields to NULL if required.

     

    The AR System has worked like this for more than 20 years. I understand why the WebService interface did not invent something new.

     

    If you skip a field in the WebService call, and do not include it in the XML. Does it still get updated? I guess many implementations of WebService-clients have problems with a dynamic approach like that, but the fault would not lie in the AR System implementation in that case.

     

            Best Regards - Misi, RRR AB, http://rrr.se

  • 6. Re: Webservice Set Action - for only some of the fields
    Barry Lindstrom

    Coincidentally, we were just experimenting with such a solution...Great Minds along the same tracks run, I guess.

     

    I agree that "the fault would not lie in the AR System implementation" and that BMC/Remedy is not responsible for providing such a solution, but I have clients who NEED such a solution so it would be nice if I didn't have to build it myself.