Abarna_Arunraj Respected Contributor.
Respected Contributor.
616 views

How to automattically update drop down values

Hi Experts,

I got the solution for updating the drop down field fetching from table based on true condition (My last post). But now am facing one issue, where am geting as expected when new incident open(evety time), or when i search incidents(first time) based on true condition it will fetch values for the drop down. But once i seached, again when i search another incident from the same all search. It is showing the value which i have given for previous incident. but when i close the session or even when i click again "search incidents" it is coming as expected.

And how do i update the value if it is assigned to one incident, and if i open another incident, only to show values whose active status is "true". And am using SM9.4.

Thanks in Advance.

Regards,

Abarna Arunraj

0 Likes
9 Replies
Super Contributor.. Peter Bartal Super Contributor..
Super Contributor..

Re: How to automattically update drop down values

Without seeing the specifics I can only guess. But it sounds like a variable that is not being reset.

If you are using a $G.  or $yourvariable format, these are global variables that are active for the current session. That is why they keep the same value until you close the current session. My suggestion is to use cleanup($variable) for initial or display state (format control or displayscreen), depends on what you want to accomplish.

Peter Bartal
0 Likes
Abarna_Arunraj Respected Contributor.
Respected Contributor.

Re: How to automattically update drop down values

Thanks for your reply.

And am not using GL for fetching data, instead am using a table from which its active is true, it will fetch and display. But that is not displaying until i close and open again, or closing the session. You have given the following sugession,"My suggestion is to use cleanup($variable) for initial or display state (format control or displayscreen)" but my doubt is will this solution work if i fetch value from table? And please suggest me a solution.

Thanks in Advance.

Regards,

Abarna Arunraj

0 Likes
Super Contributor.. Peter Bartal Super Contributor..
Super Contributor..

Re: How to automattically update drop down values

Not sure what you mean under "using a table from which its active is true" is it a dvd select statement on the form? Or a JS query that fills a variable?

Maybe a screenshot of how you query the table would help.

Peter Bartal
0 Likes
Abarna_Arunraj Respected Contributor.
Respected Contributor.

Re: How to automattically update drop down values

Yes, in form i have given select query to fetch values from the table, where it will fetch only those values whose active is true. And if a number is assigned in one incident that number's active will set to false, for this using JS i have written script. And this is also working fine. But without closing the session, still that number remains same as i mentioned before.

PFA for the select query, and JS.

Thanks in Advance.

- Abarna Arunra
Install priority form.PNGJS_install.PNG

0 Likes
Abarna_Arunraj Respected Contributor.
Respected Contributor.

Re: How to automattically update drop down values

Hi Experts,

Can any one of you please help me out to solve this issue.

Thanks in Advance.

Regards,

Abarna Arunraj

0 Likes
TomPowe Acclaimed Contributor.
Acclaimed Contributor.

Re: How to automattically update drop down values

Maybe in the Display Screen, you should put an Initialization expression, such as:  cleanup(install.team.priority in $L.filed)

0 Likes
Abarna_Arunraj Respected Contributor.
Respected Contributor.

Re: How to automattically update drop down values

The solution you gave below is not working, if i give this condition in display screen it is cleaning up the field value, not the drop down value.

Can you suggest me a solution to solve this.

Thanks in advance.

Regards,

Abarna Arunraj

0 Likes
Abarna_Arunraj Respected Contributor.
Respected Contributor.

Re: How to automattically update drop down values

Hi Experts,

Can you please suggest me a solution for this one. Thanks in advance.

Regards,

Abarna Arunraj

0 Likes
ALARMus Acclaimed Contributor.
Acclaimed Contributor.

Re: How to automattically update drop down values

Can you display where you start\call your script ?

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.