add multiple textbox on displayform at runtime?
We have a geodatbase storing our gis assets and a non spatial oracle database storing those assets work order data. I am trying to create a workflow to allow user to update assets' work order data from the map. The user selects assets from the map, then the displayform will display number of textbox based on the number of assets(feature points) selected. The textbox will collect user input, then the workflow will update the non spatial oracle database using sql non-query.
To test if I could add a textbox to the displayform, I tried to use vb script inside of RuntimeModifications in the displayform, something like the following
dim newbox as new windows.forms.textbox()
newbox = new windows.forms.textbox()
newbox.Size = New Drawing.Size(100, 20)
newbox.Location = New Point(10, 10 + 25)
newbox.Name = "TextBox"
newbox.Text = newbox.Name
Me.Controls.Add(newbox)
I got an error: Unhandled exception;'Me' is valid only within an instance method.
Any help is appreciated.
Regards,
jin
-
Hi zhangi
so is there any limit to how many features they could choose? Couldn't modifying the form in this circumstance get a bit messy.
How about having one static form that get used as you loop through all of the selected features?
Regards
Ralph
0 -
Hi Ralph,
User can only choose less than 10 asset features. Could you share more detail about how to use static form in workflow? Do you mind sharing any sample workflow that uses a static form?
Thank you very much!
Regards,
Jin
0 -
Hi Zhangi
what version of the Workflow designer are you using? (Just so that I don't create a version that you are unable to use)
Thanks
Ralph
0 -
Hi Ralph,
I am using 2.20.2.19 workflow designer.
Thank you so much!
Jin
0 -
Ralph,
I first tried the sample in work flow designer simulator, The output window does not display any content when I click on "Continue" after I typed in some text in the comments box with code selection. I also don't see the part in your sample that adds multiple textbox to the form at runtime in your code.
Thank you kindly,
Jin
0 -
Hi Jin
I never intended the example to show adding multiple textboxes at runtime. Gets very messy to collect results from them etc.
I was more intending that the form be presented to the user while in a loop that goes through each of the selected features. At runtime you can update the title of the form for example to say 1 of 6, 2 of 6 ..... as they are looped through and user input collected and managed.
Regards
Ralph
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
6 Kommentare