Filter mail using get outlook activity

Hi All,

Please help me in below mentioned scenario…

I want to filter my mail using filter property in get outlook mail activity using variable.
For example: variable name filter and that variable fetching data from excel file.

But, While using this scenario it get run time error:
“Assign: Value cannot be null.
Parameter name: source”

I didn’t understand why this is error occur. If I am using same syntax"“[senderemailaddress] = ‘abc@abc.com’”" direct to filter property it working fine…
Please look into it and help me for same ASAP…

Regards
Abhishek Bist

@AbhishekBist

Are you trying below expression or not.

    "[senderemailaddress] = ‘"+row("Email column").Tostring+"’"

No, I am defining a variable name “Filter” and fetching filter parameter from excel file.
1

2

@AbhishekBist

Have you created Dictionary variable or not ?

You have to pass something like this.

           Config("filter").Tostring

Where Config variable is of type Dictionary.

Not created any dictionary variable

I am using it in this way.
image

Hi AbhishekBist,
Can you please check if the AddHeaders properties of Read range is unchecked. this might be the reason why the we you are getting null value.

Thanks
Niveditha

@AbhishekBist

Could you please print the below value using Message Box or Write Line activity and help me with screenshot.

             config(0)(1).Tostring

Hi Nivedithak,

I am unchecked the AddHeaders Properties in read range.
But again I am facing the same issue please find the error below…

[Column0,Column1
filter,“”“[senderemailaddress] = ‘mohit.srivasatava@aricent.com’”“”
]
There are multiple inverted comma’s are fetching automatically.

Regards
Abhishek Bist

Hi Lakshman,

I am facing the same issue while using Message Box.

Regards
Abhishek Bist

@AbhishekBist

Just provide the mail id only in config file and try this expression.

Don’t write entire expression in config file.

Hi
In the excel file remove the double quotes on either side as the data that is get executed from excel cell will be in string format only
So we dont need to bound the text in excel with double quotes
Just the expression like this
[SenderEmailAddress] = ‘adfgvv@abc.com’

Once after changing then fetch the cell value as you did and pass that variable to filter property

Cheers @AbhishekBist

HI Palaniyappan,

Thankyou for your response, Now its working fine.

@And Thankyou all for your support in this.

Regards
Abhishek Bist

1 Like

Awesome
Cheers @AbhishekBist

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.