I have a problem with maintaining a SQL table from an Excel file. Found a similar request here:
and tried to follow the solution.
My problem is that I get an error in the select query.
Message is: "Term 'Key_Field eq 'xxxxxx'' is not valid in a $select or $expand expression."
The Key_Field is the name of my field in the SQL table, that holds the same info as the field Key coming from the Excel file.
Then some compose fields, before this:
The lefthand side of the condition: empty(body('Get_rows_(V2)')?['value'])
But I'm not even getting to that stage.
So, instead I tried to remove the Select Query from 'Get Rows (V2)', and add the key fields in the condition part, like this:
I have more fields to add to the condition, but picked only one, for the test of it. It results in False, even though both fields are text fields. So to secure that the field from Excel actually is a text field, I tried to do a compose action to create a string, and use the output for comparison, but the result is the same: False.
How do I get the comparison to work, so I can insert new rows and update existing ones?
@Anonymous; you're right, moving the query to the filter instead of the select, got it to work.
But I still think it is a little more complicated than expected.
If I understand correctly you are trying to retrieve rows from SQL based on a condition.
It Looks as if the 'select query' box may be misnamed in that this says what fields to return.
The correct way appears below (it worked for me!) is to specify the odata query in the filter query box.
Stan
Seems I'm not the only one, that are not able to get this to work.
I have tried a lot of other approaches, and I get stuck when I get to the comparison part of the flow. No matter how I set up the 'Condition'-step, it always result in false.
I have tried adding a filter to the query, and a top 1 count, then using this function in the left hand side of the condition:
But it still results in false, even when the target list is empty.
I'm having a hard time seeing the value of this product, and at no point see it as a 'no code'-product.