WF Designer - Out Args {DatePicker prob others} - Gotcha
Hopefully the following will save some one the painful 2+ hours that I have just endured. :-)
My task was pretty simple, add a date range to my workflow with other types of searches. So I figure FromDate and ToDate. Pretty simple stuff.
The issue I got stuck on was how to convert the date being set on the Output Arguments for both of my Date Pickers, listed ioncorrectly as [Out: String]. I was expecting the results to be Object or something else but since there was a consistancy between both date pickers I thought, well ok on with my task. Then the problems really started, I could not get the values from the form into a useable format!
When I did an alert on the Output that was returned from the form it would read "MM/dd/yyy hh:mm am/pm" for example "10/01/2013 7:09 PM". When I did write line with the variable I looked like a javascript date /Date(12345345465456456)/. So for a couple hours I was searching the forums and trying to figure out how to convert this Javascript date to a useable date. Then I found a Workflow in another post that used the DatePickers and when I looked at that workflow I found that the Output Arguments for the DatePickers were [Out: DateTime], this mades sense but what was going on in my workflow?
I went back to my workflow and looked at the Output Arguments again and found they were still [Out: String], so I started tweaking the form. I deleted the Pickers and re-added them with new Out Argument names and poof the correct [Out: DateTime] appeared for the DatePickers.
Ah Ha Moment! I had copied the form and Added my DatePickers, used the existing Output Arguments from the existing controls and deleted the controls no longer needed for my date range form. Somehow in the sequence of Copy/Paste and change, the DatePicker Output Arguments were stuck on [Out : String].
The evil gremlins, loose today!
Louie Rowley
Information Systems Specialist II
(To: IIlewis.rowley@countyofnapa.org) lewis.rowley@countyofnapa.org
-
Brilliant. You made my day Louie. This fixed my problem. 6 years and still the same gremlin in the system. Thank you very much for posting this. I thought I was going made until I followed your suggestion. Rob 0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar