Forum Discussion
Tony Hignett
Mar 24, 2017Copper Contributor
SharePoint 365 SPD Workflow Dictionary default date format issue
Hi All, I'm building a SharePoint Designer workflow which uses the Call HTTP Web Service action. I have a list that contains an optional date/time field called 'Deadline'. I've added this fi...
Jason H
Dec 10, 2019Copper Contributor
Tony Hignett I've come across this too. Could have sworn it was working before without requiring the workaround.
As I had multiple date\time fields, I chose to remove all of them from the main dictionary. Then I created a dictionary per date\time field and ran the REST call inside each IF statement. Too bad there is no way to dynamically add fields to a Dictionary
kraysco
Sep 13, 2023Copper Contributor
Since the Dictionary object is additive, you only need to put a build statement inside each of the if conditional statements that check whether there is a valid date value, and then run the Rest statement at the end.
ex.
Set tempBool to No
if Current Item: date1 is greater than > Variable: emptyDate
Build {<add date1>} Dictionary (Output to Variable: dicRequestContentCreateItem)
set Variable: tempBool to Yes
if Current Item: date2 is greater than > Variable: emptyDate
Build {<add date2>} Dictionary (Output to Variable: dicRequestContentCreateItem)
set Variable: tempBool to Yes
if Variable: tempBool equals Yes
Call Variable: rstUrl HTTP web service with Variable: dicRequestContentCreateItem(Response Content ...