The model is Running a false statement with empty values while the correct statement is running as it should

944
4
Jump to solution
01-21-2022 03:29 AM
Labels (1)
SwerefTM
New Contributor III

Hello, This script works. But I have some questions if this is as it should or if I can change it further.  I will try to explain with text and image.


The questions lies just after the If statement.  The model works. If the statement is True then it running the top group  (see the image below) . But If the statement is false then its running the bottom group.   - As I it should and it works as I wanted to.  


But
The situation: But even if the model is running as it should for the false statement. I still see that the model is try to run all the parts in the true statements but with empty values.  I have tried to make a print screen at that partial moment.  

This is what I can read from the log

SwerefTM_1-1642764468729.png

It tries to run even if it cannot och should not run. Is this a normal thing?



Here I tried to explain the question as an image. 

SwerefTM_0-1642764151474.png

 

0 Kudos
1 Solution

Accepted Solutions
AdamStein2
New Contributor

Hello,

I made a similar model that checks to see what FCs in a geodatabase have a GlobalID field, and which ones don't. Then the model adds a GlobalID fields to the FCs that don't. 

If a precondition is false, and that tool in the model doesn't run, the messages usually reflect that.

So I see the same warning when my model runs through successfully.

From what I am reading you aren't having and problems with the results of your tool, correct?

Adam

View solution in original post

4 Replies
AdamStein2
New Contributor

Hello,

I made a similar model that checks to see what FCs in a geodatabase have a GlobalID field, and which ones don't. Then the model adds a GlobalID fields to the FCs that don't. 

If a precondition is false, and that tool in the model doesn't run, the messages usually reflect that.

So I see the same warning when my model runs through successfully.

From what I am reading you aren't having and problems with the results of your tool, correct?

Adam

SwerefTM
New Contributor III

Thank you.  
From what I am reading you aren't having and problems with the results of your tool, correct?  Thats correct

"If a precondition is false, and that tool in the model doesn't run, the messages usually reflect that."
Ok, I think I can see your answer as a solution

/ SwerefTM

0 Kudos
AdamStein2
New Contributor

Yes - for example, my model flashed that warning every time it found a feature class that already had a GlobalID (which was actually a good thing).

This behavior threw me off the first time I saw it too, but the results of the model were what I was looking for.

SarahHartholt
Occasional Contributor III

Wondering if you have successfully implemented this in a model? I'm attempting to use the If Spatial Relationship Is and If Field Value Is tools to append an AddressPoint to an ApprovedLicense feature class only if the AddressPoint is more than 5 meters from an existing ApprovedLicense and the IssueLicense field contains the value 'yes'. Any pointers would be appreciated. I would like to see the the process did not execute because the precondition is false error message but I can see that the processes are being executed (they change from yellow to red in the ModelBuilder window) when they should evaluate to False.

More details on my issue here: If Spatial Relationship and If Field Value Is tool... - Esri Community

0 Kudos