Highlighted
Regular Contributor.. Regular Contributor..
Regular Contributor..
252 views

How to auto clear other field values when user clears a field

In order to auto populate the service subtype (customized field "subtype") when user selected the service ("affected.item") in Change tickets, in the link "cm3r" I added "Source Field" & "Target Field" in affected.item.

Link: cm3r
Field (From/Source): affected.item
File (To/Target): device
Source Field: [affected.item, subtype]
Target Field: [logical.name, subtype]

However, when user clears the value in affected.item, the subtype remains. How to automatically clear the subtype value when user clears the affected.item field?

Thanks a lot.

0 Likes
7 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: How to auto clear other field values when user clears a field

Why not use select function in FormDesigner for depended field.

0 Likes
Highlighted
Regular Contributor.. Regular Contributor..
Regular Contributor..

Re: How to auto clear other field values when user clears a field

Do you mean setting the Caption & Caption Condition for field "subtype"?
Would be grateful if you could also share the values of these properties in order to achieve.

0 Likes
Highlighted
Super Contributor.. Super Contributor..
Super Contributor..

Re: How to auto clear other field values when user clears a field

go to cm3r link --> go to affected item field by selecting the link --> in post expression you can mention like below

subtype in $File=NULL

 

0 Likes
Highlighted
Regular Contributor.. Regular Contributor..
Regular Contributor..

Re: How to auto clear other field values when user clears a field

Tried different Post Expressions in the link, but seems not working.

I put subtype in $File=NULL in Post Expressions of field "affected.item" in cm3r link, but end up when I select the service, subtype is not populated.

If I change the Post Expressions to if (affected.item in $File=NULL) then (subtype in $File=NULL), then when I clear the service, subtype still remains, i.e. not auto cleared.

How to achieve at the same time 1. auto populate subtype when user selects service, and 2. auto clear subtype when user clears service?

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: How to auto clear other field values when user clears a field

If you are using process designer then compare the file and saved file (either not the same value or from value to null) in a ruleset and then use javascript to clear the field

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: How to auto clear other field values when user clears a field

I searched in SM9.52 OOB system and found in contacts there is something similar for fields:

Primary Configuration Item (logical.name)

Company (company)

Link "contacts" fills both fields. 

But when you clear the "Primary Configuration Item" field, the content of "Company" remains on the format.

 

I would try this approach: For "Clear" of first field introduce a new button and on that button, clear both fields 

Thank you for using the MicroFocus ServiceManager Support and News Forum. If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: How to auto clear other field values when user clears a field

To clean immediately the only way is to create a do/action that cleans the field you want to clean and on a data change event of affected.ci (in FD) you refer it's number.
Regards,
Breno Abreu

If you feel this was helpful please click the KUDOS! thumb below!
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.