I’m trying to add an email filter such that it will only retrieve emails from the start and end date indicated by the user. I have tried this code but its not working
“@SQL=urn:schemas:httpmail:datereceived >= ‘StartDate’ AND urn:schemas:httpmail:datereceived <= ‘EndDate’ AND urn:schemas:httpmail:subject LIKE ‘%AIM Alerts Update%’”
Can I also check if there is a way users can select a certain date using a drop-down calendar in the input dialog
Are StartDate and EndDate string type variable of datatime? if so the following expression may help you.
$"@SQL=urn:schemas:httpmail:datereceived >= '{StartDate}' AND urn:schemas:httpmail:datereceived <= '{EndDate}' AND urn:schemas:httpmail:subject LIKE '%AIM Alerts Update%'"
' Input Dialog for Start Date
InputDialog1 (Output: StartDateStr)
' Input Dialog for End Date
InputDialog2 (Output: EndDateStr)
StartDate As DateTime variable
EndDate As DateTime variable
StartDate = DateTime.Parse(StartDateStr).ToString("yyyy-MM-dd")
EndDate = DateTime.Parse(EndDateStr).ToString("yyyy-MM-dd")
In the OutLook Filter
"@SQL=urn:schemas:httpmail:datereceived >= '" & StartDate & "' AND urn:schemas:httpmail:datereceived <= '" & EndDate & "' AND urn:schemas:httpmail:subject LIKE '%AIM Alerts Update%'"
I tried this but the date received function didn’t work as the bot still retrieved emails outside the range. Is there a specific date format that the user has to input?
not DateTime.TryParseExact(StartDate,"d/M/yyyy",System.Globalization.CultureInfo.InvariantCulture,System.Globalization.DateTimeStyles.None,New DateTime)
I have another issue regarding adding column headers/names such as “Invoice 1”, “Invoice 2”… for each non-empty columns after transposing my data. How should I go about doing this?
it seems you already raised the topic as the following. Perhaps you should share more specific information (input and expected output etc as screenshot or file) in the topic, if possible. It’s no problem if dummy data.
Our initial data has an invoice column which stores multiple invoices separated by a comma. We split the invoices using the text to column activity which will separate the invoices into different columns depending on the number invoices. However, these columns do not have headers/name. hence, we would like to name them as such “Invoice 1”, “Invoice 2”… The image below shows the expected output of the transposed data for 3 invoices.
Hi, I think I meant it like if I am given the Invoices column and then I separated each row below Invoices by its commas, I will get each invoice on its own eg. {v, w, x, y, z} gives me 4 new columns on the right of it. BUT for these columns, they will not be assigned a header above, so how will I be able to automate and name these columns accordingly as “Invoices 1”, … “Invoices 5”
then after the splitting by commas, new columns will appear but without the column headers eg. Invoices 1, …, Invoices 5