I am attempting to autopopulate a MunicipalID field (long integer) with a number between 1-21 depending on the value selected in a domain based text field. My initial thought was an expression in the dynamic value table using the IIF function. The first attempt was too long being a total of 765 characters, no spaces. I then tried to break it down into smaller chunks and assign a rule weight so that I could still use the IIF function. No matter how I write it I cannot get the expression to work. I am hoping that someone can either tell me what I am doing wrong or tell me a different way to accomplish this. My initial statement was as follows:
IIF([Municipality]="Bethel",1,IIF([Municipality]="Callicoon",2,IIF([Municipality]="Cochecton",3,IIF([Municipality]="Delaware",4,IIF([Municipality]="Fallsburg",5,IIF([Municipality]="Forestburgh",6,IIF([Municipality]="Fremont",7,IIF([Municipality]="Highland",8,IIF([Municipality]="Liberty",9,IIF([Municipality]="Lumberland",10,IIF([Municipality]="Mamakating",11,IIF([Municipality]="Neversink",12,IIF([Municipality]="Rockland",13,IIF([Municipality]="Thompson",14,IIF([Municipality]="Tusten",15,IIF([Municipality]="Bloomingburg Village",16,IIF([Municipality]="Jeffersonville Village",17,IIF([Municipality]="Liberty Village",18,IIF([Municipality]="Monticello Village",19, IIF([Municipality]="Woodridge Village",20,IIF([Municipality]="Wurtsboro Village",21,<Null>)))))))))))))))))))))
This, obviously, is too long but the chunks don't work either. I need to accomplish the following process.
I have tried, for the false result, a number of options including 0, Null, <Null>, 00, "", and not putting anything in that result. Nothing.
I set the "On Change Attribute" to TRUE, all others to FALSE, as that is the most appropriate for what I am trying to accomplish. When that didn't work I tried it with TRUE for the standard three and FALSE# for "On Manual" but that does not work either.
Any suggestions/help is greatly appreciated. I'm still fairly new at using the attribute assistant.
Jenn
That's a pretty big iif; it's real easy to miss something in the middle, or have a missing close-paren. (Not that I've ever done that..... Today anyway...)
When you do this: IIF([Municipality]="Bethel",1,0) it doesn't work? That would be my approach; one iff, then two iif's etc and run each new iteration, but it sounds like you've done that. And how are you testing it? By changing an attribute value or running the rule interactively?
My dynamic table is at another client site, and I won't back there till Thursday; if you haven't got it fixed by then, I'll see what I can find.
I am testing by changing the attribute value (aka: selecting a new domain value) in the Municipality field. I will try the one iif, two iif iteration. Didn’t think of doing it quite that way, my “chunks” were about 5 municipalities long. I’ll let you know either way.
Jennifer D. Stone
Jennifer D. Stone
Tax Map/GIS Technician
Sullivan County Real Property Tax Services
and 911 Addressing Center
Sullivan County Government Center
100 North Street
Monticello, NY 12701
Phone: (845) 807-0224
Fax: (845) 807-0232
Email: jennifer.stone@co.sullivan.ny.us<mailto:jennifer.stone@co.sullivan.ny.us>
Disclaimer: The Office of Real Property assumes no responsibility for any errors or omissions in the information provided. Furthermore, the Office of Real Property makes no representation as to the accuracy of the information provided. The Office of Real Property specifically provides this information as is and expressly disclaims responsibility for damages or liability, whatsoever, that may arise from use of the information provided.
Confidentiality Notice: This e-mail message, including attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and attachments. Thank you.
The first expression shown below works, no issues. Running it through by iteration helped, thank you, Joe! Michael also let me know that I would need to use the code value and that helped to, thank you! My problem now is that the expression works for BE-HI, as found in the first expression but the towns/villages in the second and third expression do not work, it just gives me a “0”. I tried with and without the rule weights (as shown), neither one works. Any ideas?
Jennifer D. Stone
Jennifer D. Stone
Tax Map/GIS Technician
Sullivan County Real Property Tax Services
and 911 Addressing Center
Sullivan County Government Center
100 North Street
Monticello, NY 12701
Phone: (845) 807-0224
Fax: (845) 807-0232
Email: jennifer.stone@co.sullivan.ny.us<mailto:jennifer.stone@co.sullivan.ny.us>
Disclaimer: The Office of Real Property assumes no responsibility for any errors or omissions in the information provided. Furthermore, the Office of Real Property makes no representation as to the accuracy of the information provided. The Office of Real Property specifically provides this information as is and expressly disclaims responsibility for damages or liability, whatsoever, that may arise from use of the information provided.
Confidentiality Notice: This e-mail message, including attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and attachments. Thank you.
Can you true on the log, it might help, but breaking it down is the best bet. That is one long statement and a simple typo in the middle could cause it to break. The engine we are using to evaluate it does not much provide much help.
You do need to use the value of domain not the description.
That definitely helps, as I had no clue which one was needed. I will do that ASAP. Thank you so much!
Jennifer D. Stone
Jennifer D. Stone
Tax Map/GIS Technician
Sullivan County Real Property Tax Services
and 911 Addressing Center
Sullivan County Government Center
100 North Street
Monticello, NY 12701
Phone: (845) 807-0224
Fax: (845) 807-0232
Email: jennifer.stone@co.sullivan.ny.us<mailto:jennifer.stone@co.sullivan.ny.us>
Disclaimer: The Office of Real Property assumes no responsibility for any errors or omissions in the information provided. Furthermore, the Office of Real Property makes no representation as to the accuracy of the information provided. The Office of Real Property specifically provides this information as is and expressly disclaims responsibility for damages or liability, whatsoever, that may arise from use of the information provided.
Confidentiality Notice: This e-mail message, including attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and attachments. Thank you.
The first expression shown below works, no issues. Running it through by iteration helped, thank you, Joe! Michael also let me know that I would need to use the code value and that helped to, thank you! My problem now is that the expression works for BE-HI, as found in the first expression but the towns/villages in the second and third expression do not work, it just gives me a “0”. I tried with and without the rule weights (as shown), neither one works. Any ideas?
Jennifer D. Stone
Jennifer D. Stone
Tax Map/GIS Technician
Sullivan County Real Property Tax Services
and 911 Addressing Center
Sullivan County Government Center
100 North Street
Monticello, NY 12701
Phone: (845) 807-0224
Fax: (845) 807-0232
Email: jennifer.stone@co.sullivan.ny.us<mailto:jennifer.stone@co.sullivan.ny.us>
Disclaimer: The Office of Real Property assumes no responsibility for any errors or omissions in the information provided. Furthermore, the Office of Real Property makes no representation as to the accuracy of the information provided. The Office of Real Property specifically provides this information as is and expressly disclaims responsibility for damages or liability, whatsoever, that may arise from use of the information provided.
Confidentiality Notice: This e-mail message, including attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and attachments. Thank you.
The highest number weight runs first, so the first expression with weight of 1, is overwriting the others. For the last IIF statement, the false condition should be [#] or use the field name [MunicipalID] so if nothing is found, the existing field value is used.
Michael & Joe,
After a bit of playing around with the false condition for the last IIF expression in each IIF statement it works! See below for the statements as they are now. I don’t know that the “Nothing” does anything except leaves it alone because it doesn’t actually change it to Null, but by adding that (instead of ”) it now works. Thank you for all your help!
Jennifer D. Stone
Jennifer D. Stone
Tax Map/GIS Technician
Sullivan County Real Property Tax Services
and 911 Addressing Center
Sullivan County Government Center
100 North Street
Monticello, NY 12701
Phone: (845) 807-0224
Fax: (845) 807-0232
Email: jennifer.stone@co.sullivan.ny.us<mailto:jennifer.stone@co.sullivan.ny.us>
Disclaimer: The Office of Real Property assumes no responsibility for any errors or omissions in the information provided. Furthermore, the Office of Real Property makes no representation as to the accuracy of the information provided. The Office of Real Property specifically provides this information as is and expressly disclaims responsibility for damages or liability, whatsoever, that may arise from use of the information provided.
Confidentiality Notice: This e-mail message, including attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and attachments. Thank you.