Highlighted
Absent Member.
Absent Member.
520 views

Stored system.vars.$file in format control

Jump to solution

In my HPSM v. 9.30 I use some logic in format control where i call doSave() of another file. So after calling i get different $file and my validation going crazy.

And I think what if i stored my $file befor doSave and restor them after?

0 Likes
1 Solution

Accepted Solutions
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Stored system.vars.$file in format control

Jump to solution

The triggers are stored in the triggers table. The triggers which are executing will have the name of your table in the table.name field. You can go through all of them and set the table.name field to "<table>OFF" - that will disable them from executing. Then try your JS with doUpdate(). If the JS works, then one by one you can set the triggers back to "<table>" and try the JS again. Eventually, you'll find the trigger which is failing, and then you can take steps to troubleshoot that trigger.

View solution in original post

0 Likes
6 Replies
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Stored system.vars.$file in format control

Jump to solution

This is pretty vague. I'm not sure if you're asking a question or just wanting a discussion, but you may be performing the wrong function in JS.

doUpdate() is the way to save a record in JS without invoking the Doc Engine.

doAction("save") is the way to save a record in JS with invoking the Doc Engine (and thereby including things such as notifications, validation, etc.). Note: The "save" part of doAction("save") is defined in the State for the record in question; so therefore you can use doAction("") to call whichever action is available in that State.

system.vars.$file should work in formatctrl; you may be having issues because it's trying to execute doSave(), which it doesn't understand.

You also need to be sure that you have declared the other table, declared a working query, and that the query actually found the record(s) for which you are looking.

These are just some thoughts based on your post. If you want to elaborate and/or provide some screenshots, feel free.

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Stored system.vars.$file in format control

Jump to solution

My appologise, of course i mean doAction("save").

Unfourtnatly I can't use doUpdate(), because it rise error like "trigger cancelled the update operation" (i don't know how it looks in englsh).

My primary aim is update data in different table when i save Interaction.

0 Likes
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Stored system.vars.$file in format control

Jump to solution

OK, so the JS we are discussing is in a formatctrl, is that correct?

Do you know which trigger is failing? Are there any helpful prints in the log? If there are any snippets of code which get printed to the log or the message tray, you can use those snippets to search for triggers if you don't know the trigger which fails. If you can't find the trigger, it might be helpful to turn off all triggers for the table your JS is updating, then turn them on one by one to see which one fails.

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Stored system.vars.$file in format control

Jump to solution

OK, so the JS we are discussing is in a formatctrl, is that correct?

Yes

Do you know which trigger is failing? Are there any helpful prints in the log?

No, error message has no trigger name.

it might be helpful to turn off all triggers

How can I do this? The triggers Is in the left side on picture? How can I off them?

But the main problem is that error arise spontaneously, not in every save.

0 Likes
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Stored system.vars.$file in format control

Jump to solution

The triggers are stored in the triggers table. The triggers which are executing will have the name of your table in the table.name field. You can go through all of them and set the table.name field to "<table>OFF" - that will disable them from executing. Then try your JS with doUpdate(). If the JS works, then one by one you can set the triggers back to "<table>" and try the JS again. Eventually, you'll find the trigger which is failing, and then you can take steps to troubleshoot that trigger.

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Stored system.vars.$file in format control

Jump to solution

Finally I found a debasing trigger. It's name 'baseline.compliance.device' and call 'trigger.config.baseline' application.

And I have no idea what is it.

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.