Select to view content in your preferred language

Problem with Field Calculator

2788
19
05-09-2022 12:12 PM
Labels (3)
aam
by
Frequent Contributor

I am using ArcGIS Pro, I have a Feature Class along with standalone tables, the content of tables need to be brought into the Feature Class.

The Table contains over 6000 records and I use Definition query to filter out the records that I need to bring in. I do a join based on the Primary ID and then using the Field Calculator to populate the records from the joined table. However when I run the Field Calculator, the records that I are suppose to be hiding (filtered out) are being populated.

Has anyone experienced this before, how can I overcome this?

0 Kudos
19 Replies
aam
by
Frequent Contributor

That was a good suggestion and I tried that but I am getting the same results.

0 Kudos
RhettZufelt
MVP Notable Contributor

I see you changed the original question from populating with the wrong field values to filtered out fields are being populated as well. Yet, the video demonstrates what the question "used" to be, populating from a different field.

Are you seeing both of these?

R_

0 Kudos
aam
by
Frequent Contributor

I edited the original post as the main concern here is the values that are supposed to be hidden are being used to populate the records.

I used this same table before to populate the total population and now using it for each age group. The values that are being populated are the ones for the total count. I wonder if Indexing has anything to do with it?

0 Kudos
RhettZufelt
MVP Notable Contributor

I agree, it kind of looks like an indexing issue, but I don't know if/where that could be changed with the calculate tool.

I'm at a loss.  I've tried what I can to reproduce, but can't.

Thought maybe it was getting confused with the alias (with special characters and all), but doesn't seem to make a difference for me (on 2.9.2).

If it were me, I'd add just the FC and single table to a new Pro project and see if the issue persists.  If so, would export the table to a new geodatabase table (maybe even check geometry on the FC), add that and see if it works.  Might be some mystery "corruption" in the table or FC somewhere.

(Actually, if it were me, I'd try the arcade by @jcarlson as it helps me learn other ways.  Also, if the Arcade produces the same results, would defiantly suspect a data issue).

R_

 

BryndaHatch
Esri Contributor

could you try doing the join in the other direction?  

0 Kudos
aam
by
Frequent Contributor

aam_0-1652132301533.png

I get this error if I do the reverse join.

0 Kudos
RhettZufelt
MVP Notable Contributor

You can do a "reverse" join, but you can only calculate on the original table, not the joined table, or it will give you errors like you see.

R_

So, exporting the feature class and table to new geodatabase items, loading the new FC and table into a new project (could be issues with data, table or aprx.), you still have these same issues?

0 Kudos
aam
by
Frequent Contributor

This is what I am going to do next. I feel the project file might be corrupted. 

0 Kudos
aam
by
Frequent Contributor

So I just exported the filtered results to a separate table and then did the join based on the new table. It worked.

0 Kudos
RhettZufelt
MVP Notable Contributor

Good to hear.

Sometimes there is no "answer", so you just trial and error until you find out where the issue is.

R_