Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..
365 views

Assigning a number to custom table record via Web service:

Experts,

I have a custom table, which is getting populated via the HP Connect-It SM web services connector.
The unique key in the custom table is 'cu.number' (char field).

I have created the extaccess record for this table and

the action is 'add'
Label : create
Allowed action: Create Only

Under the expression tab, I have added the below condition , so I could assign the number when the record is created

cleanup($cu.inc.no);$cu.inc.no=""
$L.void=rtecall("getnumber", $L.rc, $cu.inc.no, "cuIncoming")
cu.number in $L.file=$cu.inc.no


But this is method is not working out. It giving me error code 71 "validation failed'.

Is there any other way to assign the number to the record. ?

Thx

I am Listening..
0 Likes
6 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Assigning a number to custom table record via Web service:

Based on your other post it looks like it is working, at least the reponse has this number which you could verify as having been created by your getnumber call:

<Number type="String">UB-IM-1027</Number>

I don't think your 71 error code is related to a bad Number.

Do you have anything set in the datadict record for your custom table as far as mandatory fields or validations?

 

 

0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Assigning a number to custom table record via Web service:


The table is a new one. It doesnt have any validation in place.
I am testing the intial insert into this custom table. If I remove these expressions and hardcode the value, it inserts successfully.

I am Listening..
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Assigning a number to custom table record via Web service:

Interesting.

If you change this line in your expression

$L.void=rtecall("getnumber", $L.rc, $cu.inc.no, "cuIncoming")

to

$L.void=rtecall("getnumber", $L.rctemp, $cu.inc.no, "cuIncoming")

Does it work?

Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Assigning a number to custom table record via Web service:

Did you have a chance to try the change with the variable name?

The reason for the change is that just like $L.file is used internally to represent the current record.  The variable $L.rc is also used internally for the state of the return code.

It is possible that your use of $L.rc altered the value that some later RAD is depending upon.

 

 

Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Assigning a number to custom table record via Web service:

Yes, i tried changing the return code local variable name to something else as you suggested.Stil I got the same error.

I am Listening..
0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Assigning a number to custom table record via Web service:


I think , I fixed the problem. I removed the expression completely from the extaccess record.

I added an Object record for this custom table and specified all the things there. Master fc , Number file etc..

Now, its able to successfully add the record into the table.

I am Listening..
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.