Runtime Dates defaulting to 1900-01-02?
I've created two workflows, one that allows users to enter dates into a sql table ('Submit'), and another that allows users to update those dates ('Update'). I have runtime modifications configured in the Update workflow, however, whenever I input new dates, all of the dates in the sql table default to '1900-01-02'. I have no idea where this date is coming from.




Here is the Update workflow...
The date form...


One of the runtime modifications...I have similiar 'If/Assign' activities for each date field...

The update command in the SQL Non Query task...

And the results in the sql table...

Any ideas anyone? I want to pull my hair out.
0
-
Hi Lisa,
I'm not an SQL expert but I believe the issue is with your SQL update command. It appears to me that you are assigning the date fields a value of either 0 or 1. I believe you should be assigning the value selected on the datapicker in the form?
Regards,
Wayne Richard
Latitude Geographics Group Ltd.
Head Office: 300 – 1117 Wharf Street Victoria, BC Canada V8W 1T7
Tel: (250) 381-8130 | Fax: (250) 381-8132 | wrichard@latitudegeo.com
Developers of Geocortex web-based mapping software | www.geocortex.com
An Esri Platinum Business Partner0 -
Hi Wayne,
I am FAR from a SQL expert myself but miraculously I figured it out...
I had this as my update statement...
UPDATE ECData.dbo.TB_Erskine_CleanupStatus SET
Hazmat_date = Case When len(@p_hazmat) > 0 Then 1 Else 0 End,
SiteDoc_date = Case When len(@p_sitedoc) > 0 Then 1 Else 0 End,
Asb_date = Case When len(@p_asbestos) > 0 Then 1 Else 0 End,
Debris_date = Case When len(@p_debris) > 0 Then 1 Else 0 End,
Confirm_date = Case When len(@p_confirmdate) > 0 Then 1 Else 0 End,
Confirmation = cast(@p_confirm as varchar(6)),
Erosion_date = Case When len(@p_erosion) > 0 Then 1 Else 0 End,
Final_date = Case When len(@p_final) > 0 Then 1 Else 0 End
WHERE Link = @link
When it needed to be this...
UPDATE ECData.dbo.TB_Erskine_CleanupStatus SET
Hazmat_date = @p_hazmat,
SiteDoc_date = @p_sitedoc,
Asb_date = @p_asbestos,
Debris_date = @p_debris,
Confirm_date = @p_confirmdate,
Confirmation = cast(@p_confirm as varchar(6)),
Erosion_date = @p_erosion,
Final_date = @p_final,
isHazMatDateFilled = Case When len(@p_hazmat) > 0 Then 1 Else 0 End,
isSiteDocDateFilled = Case When len(@p_sitedoc) > 0 Then 1 Else 0 End,
isAsbDateFilled = Case When len(@p_asbestos) > 0 Then 1 Else 0 End,
isDebDateFilled = Case When len(@p_debris) > 0 Then 1 Else 0 End,
isConfirmDateFilled = Case When len(@p_confirmdate) > 0 Then 1 Else 0 End,
isErosionDateFilled = Case When len(@p_erosion) > 0 Then 1 Else 0 End,
isFinalDateFilled = Case When len(@p_final) > 0 Then 1 Else 0 End
WHERE Link = @link0 -
Hi Lisa,
That makes total sense!
Now if I can just figure out how to get my hair back ;)
Regards,
Wayne0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
3 kommentarer