AnsweredAssumed Answered

Table Lookup : Pull Multiple row values into one attribute?

Question asked by alanR on Jun 3, 2020
Latest reply on Jun 5, 2020 by alanR

Hi ,

 

Is it possible to pull values from multiple rows in an AF table and populate a single AF attribute?. What im trying to do is send a particular type of notification(Open, Closed, Normal) to particular users based on the state of the notification. So say i have an analysis that looks at a tags value. If the tags value goes greater then 10 , this triggers a notification that is send to the email addresses.

AF attributes;

Notification Status <- This attribute get populated with a value of 1,2 or 3 , depending on the status of the pi tag that an analysis is looking at.

EmailAddress. <- This attribute is a Table Lookup. The SQL i have for this is;

 

SELECT Email FROM [EmailsTable] WHERE Open= @NotificationStatus OR Closed = @NotificationStatus OR Normal= @NotificationStatus

 

An example of the AF table "EmailsTable".

So say the "Notification Status" attribute value is "1", the table lookup sql should populate the "EmailAddress" attribute with "bob@email.com, Jane@email.com, tom@email.com" . What i currently have it doing is pulling the value from the first row, can i get it to pull values from other rows?

 

Thanks

Outcomes