Convert Geometry point back to original selected address?
Hi All,
I have a workflow that does the following:
A person enters an address --> It provides them a list of possible choices --> They choose the correct address from the list --> It then converts that selected address to a Geometry point & Zooms to that location on the map
However what I can't figure out is, how can I take that original selected address (after it has been converted to a Geometry point and thus assign X & Y coordinates) and add it to a Report?
I had it originally setup to where the value the user entered for the address was passed into the report, however the person could then go on to chose another address completely from the one they entered.
If I convert the selected address (that was turned into a Geometry point so it could zoom to it on the map) to a string, I just get the X & Y coordinates for the point not the original selected address.
If I try to take the selected address BEFORE it's been turned into a Geometry point, and add it to a Dictionary for the report, I then receive a serialization error later on when it's compiling the report.
I know this is happening because it's doing this sequence, outside of the main sequence which runs queries on few other layers to add to the report.
I've done research and racked my brain, but I can't figure out a way to convert it back to the original selected address to add it to the report.
Any help of suggestions at this point would be amazing.
Thank You,
Laura
-
Update: So I found out I could something along the lines of creating a Session Variable that will store the value, and can be called later on in the workflow.
However i'm not sure how to do this in the Workflow Designer as there is nothing in the toolbox that jumps out.
Any ideas would really be appreciated.
Thank You!
Laura
0 -
Hi Laura,
I assume you are using a form to display the possible addresses and a variable to store the value of the address they selected in order to pass it to an activity that would create a geometry point?
If so, you should be able to just re-use that variable that stores the address they selected (if you don't reassign it at some point), and pass it later in the workflow to the Report. If that variable does get reassigned, maybe you could create a new variable to hold the original value?
Otherwise, could you provide more information on how you are "converting" the address to a geometry point, and what object type is the address? String? AddressCandidate? Graphic?
-Victoria
0 -
Hi Victoria,
The variable does get reassigned, so I need to create a new variable to hold the original value. My problem is, i'm not sure how to go about that.
Any suggestions would be amazing at this point, i've definitely been staring at it too long.
Thank You!
Laura
0 -
You should be able to simply create a new variable in the Variables section at the bottom of the Designer window, and use an Assign activity to assign the value of the original variable to the new one. Insert the Assign activity into the workflow at some point before the value of the original gets changed.
-Victoria
0 -
Hi Victoria,
I implemented your suggestion, but because in the Assign activity I said the New Object = the Original Object (aka the selected address from the list), it still takes on the reassigned form of the original selected address later when it compiles the report.
In the Variables, for the New Object, should I put some specific in the Default section? It's currently blank.
Thank You,
Laura
0 -
Hi All,
I still haven't figured this out yet. So if anyone can help, I would really appreciate it.
I implemented Victoria's suggestion from above, but b ecause in the Assign activity I said the New Object = the Original Object (aka the selected address from the list), it still takes on the reassigned form of the original selected address later when it compiles the report.
In the Variables, for the New Object, should I put some specific in the Default section?
It's currently blank.
Thank You,
Laura
0 -
Hi Laura,
Could you provide some more information on what your object types are, how you're converting the addresses into Geometries, and how you're adding them to the report?
If you are just wanting to pass the text of the address, you should be able to create a new variable of type String, and then depending on the type of your Address object, assign newStringAddress = oldAddressObject.ToString(). This will hold just the value of the address text in the string variable, which means it won't be pointing to the same address object and so get changed when the object changes.
A snippet of your workflow might be helpful to show us what's going on.
-Victoria
0 -
That fixed it! So fabulous!
Thank you Victoria!
0
Please sign in to leave a comment.
Comments
8 comments