Power Automate Cloud - OneDrive When a file is created Trigger Condition - triggers

I'm using the OneDrive when a file is created trigger in my flow. I want to set a trigger condition that will only trigger if the file type is .xlsx
I tried the following condition:
#contains(triggerOutputs()?['headers/x-ms-file-name-encoded'], 'xlsx')
I get the following error:
InvalidTemplate. Unable to process template language expressions for trigger 'When_a_file_is_created' at line '1' and column '37225': 'The template language function 'endswith' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#endswith for usage details.'.
I did some research on-line and it appears to be due to the OneDrive dynamic selector "File name" being encoded, but I wasn't able to find any solutions for working around this issue.
Any help is greatly appreciated
Thanks

You can use the base64tostring function to turn it into a readable string.
Try an trigger condition expression like below
#endswith(base64tostring(triggerOutputs()?['headers/x-ms-file-name-encoded']), '.xlsx')

Related

Azure Data Factory - Capture error details of a dataflow activity -> Store into a variable -> Assign this variable to a dataflow parameter

I have a data flow and my requirement is to capture the error details into a variable when it fails and assign this variable to a parameter in the next data flow. I tried to achieve this until the second stage(With help) as below, but I'm unable to get this variable assigned to a parameter in the next data flow. The error I get is - Expression cannot be parsed
What do I do later?
This parameter is assigned to a column in the data flow and I use this column to update the table in the dedicated pool with the relevant error message.
I tried to reproduce the same in my environment and I got the same error
The above scenario fails, because dataflow fails to parse ' ' and / in your error message.
To resolve above error,please follow below steps:
I just create the error fail1 with message containing a different character.
Go to set variable : Create a variable and added dynamic content to the value.
#replace(replace(string(activity('Fail1').output.message),pipeline().parameters.quote,'"'),'\','/')
Output:
Updated:
Parameter

how to add dynamic content for ADF datafactory

I want to add dynamic parameter for my ADF pipeline. I have 2 parameter and i want to concat with '/'.
1. My source folder-> pipeline().parameters.sourcefolder
2. My source file-> pipeline().parameters.sourcefile
I have tried this dynamic parameter. but i am getting error.
#concat{(pipeline().parameters.sourcefolder,'/',(pipeline().parameters.sourcefile)}
but is giving me error. Can you please help me.
Since you already have the two parameter , I suggest you define the variable and use the "Set variable" activity and concatenate the parameters there .I have the Fname & Lname as the defined parameter and the below expression should work fine .
#concat(pipeline().parameters.Fname,'/',pipeline().parameters.Lname)

Running a query using date from a form MS Access

How do I run a query using a value from a textbox from a form I have? I know that there is another post here at Stackoverflow dealing with this issue but I found it to be insufficient for my needs.
I formated my textbox into Medium Date format with its default value being =Date(). However, when I pick up a date and open my report I get this error:
Runtime error 3071: Expression Too Complex
My where clause is this
WHERE
(
(AllInfo.DateOpened >= CDate([Forms]![Main Form]![WindowPrintOptions]![CustomizedReport]!txtDateOpenedFrom.Value))
)
and I am sure it is this code piece that is throwing the problem since when I take it out of the query the error message simply disappears.
Any ideas?
Try with:
(AllInfo.DateOpened >= DateValue([Forms]![Main Form]![WindowPrintOptions].[Form]!txtDateOpenedFrom))
)
Folks,
I got the problem. It was the "AllInfo" alias. It wasn't applicable at that escope inside the query. By changing the proper things, it was enough to write:
[Forms]![Main Form]![WindowPrintOptions]![CustomizedReport]!txtDateOpenedFrom.Value
Issue solved. Thank you all!

What are the rules for a valid variable name in mirth?

I am trying to set up a transformer on a Database Reader to file writer channel. I am reading in a sql field called MRN which I would like to send to a variable called mrn. I added a step to a channel with a variable called tmp['MSH'] mapping to a variable called msg['MSH'] But mirth is giving me the error message:
The variable name contains invalid characters. Please enter a new variable name
What are the rules for a valid variable name in mirth?
tmp and msg are two built-in variables containing E4X mappings of the outbound template and inbound message, respectively. You would map, via a MessageBuilder step, from inbound to outbound with tmp['MSH'][...] = msg['MSH']... where ... refers to the appropriate sections. Essentially these are pre-populated javascript property arrays.
If you really want to create a variable for use in multiple places, the rules are alphanumeric plus '_', I believe.
In a MessageBuilder step, you could refer to a previously created variable with ${varname}.
I would recommend investing a little time in getting familiar with the basics. Documentation is wanting, to be sure, but this blog post series are a good place to start.

SSIS - Passing Parameters to an ADO .NET Source query

I know this has been asked earlier.
Most of the answers were not relevant.
Google, shows that the solution is to configure the expression in the "data flow task" and set the query.
However in the ADO .NET source, when I try to preview the output I keep getting "Must declare the variable '#'"
It does not show the full variable in this error - "#[User::GLOBAL_PARAMETER]"
I think that's because "[USER::" isn't the correct syntax inside a SQL; but then how does one set it ?!
From your description it seems like you are having an error due to using the variable name inside the query string as opposed to the processed variable value. In other words:
"SELECT * FROM #[User::TABLE]" in the expression builder would be WRONG
"SELECT * FROM " + #[User::TABLE] would be CORRECT
It would help if you shared the expression you are using as a query