cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Condition comparing SQL column to SharePoint List ID column

I have a condition that compares an nvarchar SQL column to a SharePoint list ID column, but the condition keeps evaluating to false even when both columns contain the same value - is this sort of comparison possible, first of all, and if so what is keeping it from evaluating to true?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Anonymous,

 

If the Dynamic content type is not the same, the condition would be always in false.

To compare the value, please consider take use of the conversion function.

Click the Advanced option of the condition, then add the Int() function for those two fields.

Something like:

@equals(
               int( SQL Content ),
               int ( SharePoint Content )
       )

Doing it in this way should make it work.

If you have any further questions, please post back.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
sergeluca
MVP

did you store them in string variables before the comparison ? (just curious)

 

Anonymous
Not applicable

No, I haven't done anything to them. I'm simply selecting what appears in the dynamic content popup.

Hi @Anonymous,

 

If the Dynamic content type is not the same, the condition would be always in false.

To compare the value, please consider take use of the conversion function.

Click the Advanced option of the condition, then add the Int() function for those two fields.

Something like:

@equals(
               int( SQL Content ),
               int ( SharePoint Content )
       )

Doing it in this way should make it work.

If you have any further questions, please post back.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi,
I'm also trying to achieve something similar but not having much luck.

I'm also trying to achieve something similar but not having much luck. I have 2 identical SQL tables and a flow that copies all records that are older than 7 days from Table 1 to Table 2 and then delete from Table 1. 

But the flow fails to run frequently while trying to copy duplicate records from Table 1 to Table 2. (Table 2 doesn't accept duplicate records for a certain column.)

So I'm planning to add a condition to check if a certain record exists in Table 2 before copying and skip those records if the condition is true.

Below is a screenshot from my flow. Much appreciated if someone can show some light to achieve this. Thanks!

flow.PNG

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (3,681)