DisplayCaptureGeometry Geometry Required is not working
I have a DisplayCaptureGeometry activity in my workflow that has the 'Geometry Required' control set to 'True' but it doesn't seem to work. I have two command buttons in this and if I run it and click one of these without capturing any geometry first, it doesn't stop me. It goes onto the next activity in my workflow.
Have I misunderstood what is supposed to happen?
If this is normal behaviour then is there a way that I can determine whether any geometry has been captured by analysing the value of the returned geometry to see if it's null? Using a Flow Decision activity with 'ParcelGeometry = Null' doesn't work either. Workflow Designer makes some suggestion about using System.DBNull instead but I'm not sure how use this class. The MSDN documentation suggests using DBNull.Value.Equals(ParcelGeometry) but this doesn't work either.
Please help.
Mark
-
Hi Mark,
You need to check the box "Cause Validation" in the configuration of the button.
-Sune
0 -
Excellent. That works! Thanks, Sune.
Mark
0 -
In VB.NET (used by Workflow Designer) to test if a object such as a Geometry has been assigned to or not use
Object Is Nothing
or
Object IsNot Nothing (note: very important that there is no space between Is and Not)
Use System.DbNull _only_ to test if a value that came from a database is 'null'. This link has some more information on usage:
http://msdn.microsoft.com/en-us/library/system.dbnull.value.aspx
Hope this clears things up.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare