Big news! The community will be moving to a new platform April 21. Read more.
Big news! The community will be moving to a new platform April 21. Read more.
Absent Member.
Absent Member.
2646 views

unable to set local variable in set event field action

Jump to solution

I have a rule that uses a GetActiveListValue local variable to compare a value in an active list against a value in another event source. So this is a correlated rule, and im trying to get the active list value to be shown in an event field as part of the rule's action. I've turned on aggregation for all of the fields that the rules conditions filter on, as well as the fields that are called in the local variable. my local variable is named: "Employee Badge Events" and the field from the list i would like to insert into an event field is "Badge location" (note the lowercase 'l' in 'location').  Ive tried every combination of camel notation within the string "$employeeBadgeEventsBadgeLocation", as well as with and without the "." ($employeeBadgeEvents.BadgeLocaton) but cant get the list data to populate in the event field when the rule successfully fires. Instead it just puts "$employeeBadgeEventsBadgeLocation" in the device custom string 4 field.

HAAALP

Labels (1)
Tags (1)
1 Solution

Accepted Solutions
Vice Admiral Vice Admiral
Vice Admiral

Hi Ted,

My "bad" I didn't look at your screenshots!

I've tried your example.. and I can't get subfields of local variables to populate event fields either!

However, the workaround which does work, is to:

Create a local variable to concatenate an empty string with your active list field, ie:

employee    concat(,Employee Badge Events.Employee)

Then use this local variable in your rule action and rule aggregation.

View solution in original post

6 Replies
Cadet 1st Class
Cadet 1st Class

Hi Ted,

Have you tried to use the correct case sensitive LV name?

$EmployeeBadgeEventsBadgeLocation should be the correct string. You can idefinitely ignore the "."

Hope this helps.

0 Likes
Absent Member.
Absent Member.

yes, just tried it again to double check and im still seeing "$EmployeeBadgeEventsBadgeLocation" in the Device custom string 4 field in my active channel, instead of an actual value from the list.

0 Likes
Vice Admiral Vice Admiral
Vice Admiral

Remember to add your local variable to the other fields in the aggregation tab for the rule.. it should then populate correctly in the active channel.

0 Likes
Absent Member.
Absent Member.

I dont understand, i thought i already had the two local variables added to the aggregation tab. Could you check the image i uploaded to make sure its correct?

0 Likes
Vice Admiral Vice Admiral
Vice Admiral

Hi Ted,

My "bad" I didn't look at your screenshots!

I've tried your example.. and I can't get subfields of local variables to populate event fields either!

However, the workaround which does work, is to:

Create a local variable to concatenate an empty string with your active list field, ie:

employee    concat(,Employee Badge Events.Employee)

Then use this local variable in your rule action and rule aggregation.

View solution in original post

Absent Member.
Absent Member.

awesome! finally got it to work with the workaround you suggested. Thank you!

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.