Hi,
I have been working on a tool to pull an MS Access query and transform it into a Portal Feature Service. Had it working for a week, but now it does not work anymore. There is one specific problem...
There are 20 fields that contain a simple 1 or 0 in the Access db. When I export to CSV, all of the data in those fields is either a 1 or a 0 for every record. My Portal Feature Service is ready for those values in each of those integer fields with a domain (1=True, 0=False) . When I first made my Workbench Tool, it worked. I had an Access Reader, VertexCreator, CoordinateSystemSetter, Reprojector, and the Portal Feature Service Writer.
Now, for some reason, all of my 1 values are writing as -1 (negative one). I have no idea why. When I look at a table, I see "No" or "-1" now. The 0 (zero) is coming out right, but the 1 is being changed to a -1.
I have been tearing this tool apart, building new ones, to no avail.
I have found that the field type of all of these 1/0 fields coming out of the MS Access Reader are defined as "[yesno]". When inspecting the data of the reader and each of the Transformers, I see values of "Yes" and "No" for each. Seeing that the 0 is obviously making it into my Feature Service correctly, I thought that I could just open up the writer and in the Value entry for every one of these fields - and use the Arithmetic Editor and say [fieldname]*-1. Hey, 0*-1=0 (no change) and -1*-1=1 (yay, positive one). BUT alas, it said that I had a string calculation error - can't math "No"*-1. So - how is the No being converted to a 0 and the Yes being converted to a -1. (I am seriously confused now...)
So I found the AttributeValueMapper and, in one field, mapped "Yes" to 1 and "No" to 0. Ran the tool, and it worked.
Well - now I have to format an AttributeValueMapper for another 19 fields????
EDIT - Back in the office, trying to string a number of the AttributeValueMappers together and find that I cannot configure the newly changed value to map to the original field in the next AttributeValueMapper. Can't attach the "_looked_up" field to the correct field in the next one.
red represents field I want to pass from first AttributeValueMapper to the next.
Can I just use the same field name in the Destination Attribute to string them together?
This does not seem right.
What am I missing?
Thanks,
--Adam