Sending an Email from Schedule Report when a Column value is selected in the list

If in the table Contacts, the column of enum list type [Communications] has the โ€œQuote Reminderโ€ value selected, I would like the report to send the contact an email.

Using this expression to no avail plugged into the โ€œToโ€ field in the report action.

SELECT((Contact[Email], IN[Communications], โ€œQuote Reminderโ€), TRUE)

Any help would be appreciated. Iโ€™ll need to build 6 to 8 reports based on a variation of this expression.

Please and thank you.

Solved Solved
0 3 390
1 ACCEPTED SOLUTION

@Scott_Hall you are using the IN expression in a wrong way and the syntax of the whole expression is not correct. Below expression will work better:

SELECT(
	Contact[Email],
	CONTAINS(
		[Communications],
		"Quote Reminder"
	),
	TRUE
)

OR

SELECT(
	Contact[Email],
	IN(
		"Quote Reminder",
		SPLIT(
			[Communications],
			","
		)
	),
	TRUE
)

View solution in original post

3 REPLIES 3

@Scott_Hall you are using the IN expression in a wrong way and the syntax of the whole expression is not correct. Below expression will work better:

SELECT(
	Contact[Email],
	CONTAINS(
		[Communications],
		"Quote Reminder"
	),
	TRUE
)

OR

SELECT(
	Contact[Email],
	IN(
		"Quote Reminder",
		SPLIT(
			[Communications],
			","
		)
	),
	TRUE
)

@LeventK Thank you. Those expressions failedโ€ฆโ€œcouldnโ€™t fine column [_Thisrow].โ€

I trimmed it to:

SELECT(Contact[Email],CONTAINS([Communications],โ€œQuote Reminderโ€),TRUE)

It appears to like that better. Does that make sense?

@Scott_Hall
As you are triggering the workflow rule just from that table, no need to use [_THISROW], your expression is fine. I have edited my expressions under the post as well.

Top Labels in this Space