Boolean Variable issues #1030
Unanswered
Crumb-73
asked this question in
Help Needed
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm having an issue with a variable that is actively being set through a set of nested loops that I'm having a hard time making sense of.
We have 2 tables in 2 separate places where the Azure table storage is the source and Dataverse is the destination. So I'm grabbing the newest records from both places and looping first through the azure table storage records then looping through the dataverse records. If a match is found for each record it indicates that it has already been created and sets a variable to false indicating to not create this record. Otherwise it will use the default value of true. At the end of each loop for the Azure table storage it will reset the variable to true.
In the screen shots below i'm stepping through the logic where 2 Records are found in the Azure Table storage. The first records already exist in Dataverse and the 2nd one needs to be created.
Grabbing list from both tables and starting loop for the Azure table storage. I'm also verifying that the variable is true in the compose 4
We are then entering into a nested loop looking at each dataverse record for that time period. If it finds a match it sets the variable to False. As one can see it did correctly set this record to false.
After both nested loops I'm verifying the state of the variable and then performing the check to determine if the record needs to be created after cycling through the dataverse records. This indicates that the variable is false. but the condition directly under it is returning true.
So in this instance it created a duplicate record in dataverse then at the end of the of the table storage loop I reset the variable to true for the next possible record.
The next record had a different outcome and is the one needing to be creating in Dataverse.
neither instance of the data verse records set the variable to false.
Coming out as false even though it was not updated to false.
Another check outside of the loop before entering into my creation phase. Shows that it is false incorrectly.
This kind of has me going in circles here. Does anyone have any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions