Maybe i did not explain it well enough.
The triggerOutput are the first thing i get when the flow is being triggered.
The object contains some of the following information :
"ItemInternalId":"00",
"ID":12,
"Title":"test",
"First_x0020_Name":"xxx",
"Last_x0020_Name":"zzz"
Let's say i want "First name" this can be acheived from start to end of flow by doing this:
triggerOutputs()?['body/First_x0020_Name']
Further more i'm doing by myself a filtration that tells me which field names from the triggerOutput i would like to check if it contains a value. the output looks like this:
"Felt_x0020_Navn": {
"Value": "ADUserName"
},
"Felt_x0020_Navn": {
"Value": "PrivateEmail"
}
I can get all my identified values one by one by putting them into a apply to each statement and type: items('Apply_to_each_2')?['Felt_x0020_Navn/Value']
So my data is available.
Example:
TriggerOutput contains following list items:
"ID":12,
"Title":"test",
"First_x0020_Name":"xxx",
"Last_x0020_Name":"zzz"
Array contains list with columns to check for values from triggerOutput:
"Felt_x0020_Navn": {
"Value": "First_x0020_Name"
},
"Felt_x0020_Navn": {
"Value": "PrivateEmail"
}
Step 1.
My array values are being added to apply to each function. This will make it run 2 times with the input above and current element value first time to be First_x0020_Name and the second time to be PrivateEmail .
Step 2.
I'm adding a condition. In my condition i would like to check that the identified current element (First_x0020_Name) contains a value in my triggerOutput.
I would like to achieve this dynamically. From c# i would just pass a variable into my triggerOutput function hightlighted with bold containing my current element value (First_x0020_Name)
triggerOutput function:
triggerOutputs()?['body/variables('MyVariableName')'] = triggerOutputs()?['body/First_x0020_Name']
I can't get this to work, and i think, but i do now know, that the reason for this is that function read my variable function as a string instead of a function. But how to i escape this or solved it in another way?
I'm aware that i need to check if value returned isblank etc. That is not the issue. The issue is how to make it dynamically to check each identified columns in triggeroutput for values given the values from array.