Zip Code in Address?
Tim.Rainey
I'm trying to get the value of the zipcode in the address in business.
When I look at the properties on the field, it is coming up as a Matrix item: ITEM 178, COLUMN 5, ROW 1.
Here is what I have:
string zipCode = Matrix.GetFromUID(pVal.Form,"178").GetValue("5",1);
StatusBar.WriteWarning("DEBUG - Zip: " + zipCode);
For some reason the above does nothing, if I hand set zipCode to something like 12345, it will write correctly. I assume there is an error happening it's not telling me about and it isn't getting a value from the matrix?
Any tips are appreciated.
-Tim
Anders Olsson
Hi Tim,
Row index is 0 based so this will work:
string zipCode = Matrix.GetFromUID(pVal.Form, "178").GetValue("5", 0);
I know it's confusing: System Information will report Row = 1, but in code it's always Row - 1.
Regards,
Anders
Please sign in to leave a comment.
Comments
0 comments