Hi There. I have a MySQL DB with a `Countries` table where I need to make sure that the same data exists in Dataverse.
I have build a simple flow to pull the data from MySQL, loop over every record and make a lookup with Dataverse.
But I get the following error and I am not to sure where it goes wrong?
The entire flow look like this:
Solved! Go to Solution.
Hello @Rocky_Dev,
Thats strange, i tried from my end and its working as expected
Query in if Condition :
Please mark as Answer if it is helpful and provide Kudos
Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
Blog : https://microsoftcrmtechie.blogspot.com
Hello @Rocky_Dev,
Simple try using ' ' (Quotes in Country ID)
iu_integration_key ne 'CountryID'
Thats it 🙂
Please mark as Answer if it is helpful and provide Kudos
Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
Blog : https://microsoftcrmtechie.blogspot.com
Hello @Rocky_Dev,
Points to be Noted.
You are passing Country ID here as ROW ID, Country ID is UniqueIdentifier in DataVerse, and am not sure how it will be in SQL. hence you got the error.
Suggesstion:
Use List Rows to Countries in DataVerse Flows then use filter countryname eq 'CountryNameFromSQL'
then check If Condition in Flows with
@length(body('Get_rows')?['value']) equals Zero(0)
then Create else do your operation
Please mark as Answer if it is helpful and provide Kudos
Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
Blog : https://microsoftcrmtechie.blogspot.com
This almost works!
However in myql I have the following data
CountryID | Country |
1 | United Kingdom |
2 | Denmark |
3 | Non Inland UK |
4 | Sweeden |
And in Dataverse I got:
iu_integration_key | Country |
1 | United Kingdom |
2 | Denmark |
And as you said(almost),
But for some reason is `Denmark` duplicated in the outut
[
{
"CountryID": 2,
"Country": "Denmark",
"CurrencyID": 3,
},
{
"CountryID": 3,
"Country": "Non Inland UK",
"CurrencyID": 1,
},
{
"CountryID": 4,
"Country": "Sweden",
"CurrencyID": 4,
}
]
Hello @Rocky_Dev,
Thats strange, i tried from my end and its working as expected
Query in if Condition :
Please mark as Answer if it is helpful and provide Kudos
Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
Blog : https://microsoftcrmtechie.blogspot.com
I might think I made an error, sry! You initial thought was correct.
But I am having trouble convering the `CountryID` from the external database to a string:
```
A binary operator with incompatible types was detected. Found operand types 'Edm.Int32' and 'Edm.String' for operator kind 'Equal'.
```
Hello @Rocky_Dev,
Simple try using ' ' (Quotes in Country ID)
iu_integration_key ne 'CountryID'
Thats it 🙂
Please mark as Answer if it is helpful and provide Kudos
Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
Blog : https://microsoftcrmtechie.blogspot.com
User | Count |
---|---|
24 | |
4 | |
4 | |
3 | |
3 |
User | Count |
---|---|
26 | |
10 | |
9 | |
8 | |
7 |