Lieutenant Commander
Lieutenant Commander
888 views

Extaccess - how to protect value in $L.file.save field

Jump to solution

Hi there,

we use CI serial.no. as the third field for reconciliation in DEM rules of ucmdbIntegration web service for computers but we do not want to overwrite the original serial.no. in the CI record. I tried to add the following condition to Expression tab:

if (not (same(nullsub(serial.no. in $L.file, "na"), nullsub(serial.no. in $L.file.save, "na")))) then (serial.no. in $L.file=serial.no. in $L.file.save)

But I am getting Doc Engine error code 19 - Too many documents. What am I missing? Is it possible to achieve this?

Thank you in advance.

16 Replies
Vice Admiral Vice Admiral
Vice Admiral

Hi,

can you consider writing trigger on device table, before save.

this is just a workaround,

Regards,
Madhan

0 Likes
Vice Admiral Vice Admiral
Vice Admiral
try writing a trigger
Trigger name: <any name of your choice>
Table Name: device
Trigger Type: 3 - Before Update
Application: Leave it blank

Script:
if (record.serial_no_ != oldrecord.serial_no_)
{
record.serial_no_ = oldrecord.serial_no_
}
0 Likes
Lieutenant Commander
Lieutenant Commander

 @Madddy

Thank you very much for taking time and effort. Creating the trigger could be a good workaround. I am trying to find out why it is not working as expected.

serial.no. in $L.file=nullsub(serial.no. in $L.file.save, "na")

After more testing it turned out that the $L.file.save is not created at all. But according to the SM Web Services guide :

"The extaccess tool uses the same file variables as the Document Engine. For example, a file variable that holds the current record is $L.file, and the copy of the record before modifications is $L.file.save."

Test  'isnull($L.file.save)' gives 'true'.   I do not understand why old file is not created.. Without including the  expression with reference to $L.file.save in extaccess, the web service request is successful .

 

 

0 Likes
Commodore Commodore
Commodore

Hi @Jitka ,

I suspect the issue could be because the save copy check box is not checked for the format control for "device.computer" and "device.computer.master".

Maybe you could try enabling it. Although, I am not sure if this is advised.
In addition, you could also try using the Computer or Device extaccess instead.

Regards,
Matilda

 

Regards,
Matilda

View solution in original post

Lieutenant Commander
Lieutenant Commander

Hi @Matilda 

Thank you for responding. Great!  The mystery is solved! We do not have the check box for the format control for "device.computer" and "device.computer.master" checked in our implementation. After knowing all possible impacts we decide whether we turn on this option.

We have to use ucmdbComputer for integration with UCMDB.

Thank you very much, you he pointed me in the right direction.

@Madddy 

Thank you for your workaround with trigger, we may use it if we would not be able to use the save copy option in format

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.