Applying conditional tags after changing condition

Dennis R
Tera Guru

Hey all, I have a set of conditional tags that apply tags to change request records for auditing purposes. For new changes, they're working great. The problem is that yesterday I modified a condition for one of the tags to add an application, and it is not updating the change requests that meet that condition.

 

Just to make this a really simple, contrived scenario, I did the following:

 

I have a tag, call it, My App (audit). In that tag's Conditions for Labels embedded table, I have an entry called My App Affected. In that entry's condition filter, I originally had Affected Apps contains My App. But I need to add to that condition, so I changed it to Affected Apps contains My App OR Number is CHG0012345. But when I look at CHG0012345, the tag has not been applied.

 

Is there some way to force the tag engine to re-evaluate a conditional tag on the table's source records if the condition for that tag changes?

1 ACCEPTED SOLUTION

Amit Gujarathi
Giga Sage
Giga Sage

HI @Dennis R ,
I trust you are doing great.

To address this, we can follow a few steps to ensure the conditional tags are re-evaluated when their conditions change:

  1. Navigate to the ServiceNow instance and access the "My App (audit)" tag.
  2. In the tag's "Conditions for Labels" embedded table, locate the entry named "My App Affected."
  3. In the condition filter for this entry, you initially had "Affected Apps contains My App."
  4. To add an additional condition, you modified it to "Affected Apps contains My App OR Number is CHG0012345."
  5. However, the tag has not been applied to the change request CHG0012345.

To force the tag engine to re-evaluate the conditional tag on the table's source records when the condition changes, you can try the following approach:

  1. Open the "My App (audit)" tag.
  2. In the "Conditions for Labels" embedded table, remove the "My App Affected" entry.
  3. Save the changes.

Now, we will recreate the entry with the modified condition. Follow these steps:

  1. In the "Conditions for Labels" embedded table, click on the "New" button to create a new entry.
  2. Enter a suitable name for the new entry, like "My App Affected Revised."
  3. In the condition filter field, enter the updated condition: "Affected Apps contains My App OR Number is CHG0012345."
  4. Save the changes.

Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi



View solution in original post

3 REPLIES 3

Amit Gujarathi
Giga Sage
Giga Sage

HI @Dennis R ,
I trust you are doing great.

To address this, we can follow a few steps to ensure the conditional tags are re-evaluated when their conditions change:

  1. Navigate to the ServiceNow instance and access the "My App (audit)" tag.
  2. In the tag's "Conditions for Labels" embedded table, locate the entry named "My App Affected."
  3. In the condition filter for this entry, you initially had "Affected Apps contains My App."
  4. To add an additional condition, you modified it to "Affected Apps contains My App OR Number is CHG0012345."
  5. However, the tag has not been applied to the change request CHG0012345.

To force the tag engine to re-evaluate the conditional tag on the table's source records when the condition changes, you can try the following approach:

  1. Open the "My App (audit)" tag.
  2. In the "Conditions for Labels" embedded table, remove the "My App Affected" entry.
  3. Save the changes.

Now, we will recreate the entry with the modified condition. Follow these steps:

  1. In the "Conditions for Labels" embedded table, click on the "New" button to create a new entry.
  2. Enter a suitable name for the new entry, like "My App Affected Revised."
  3. In the condition filter field, enter the updated condition: "Affected Apps contains My App OR Number is CHG0012345."
  4. Save the changes.

Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi



The actual conditions are pretty long; some consisting of a couple of hundred possible affected apps. I'm accepting this answer as the solution because technically removing and re-adding the condition does indeed work.

 

The only thing I might add is that I used a script to pull the condition (which was thousands of characters long) before removing it, then modifying the SNQL conditions list in an external text editor, and using another script to re-add it back.

Jenn20
Tera Contributor

Hi, We are facing the same issue and while you can add and remove it that really doesn't completely solve the issue. Has anyone else had success with any other processes?