Hi, the ical Find event in your code use the event id as 1st parameter, your wiki description shows a json object.
The json return parameter for this object does not return the $event.uid.
So I've add the $event.uid by myself.
Sample:
$json:=iCal Find event ($eventId)
If ($json#"")
$event:=JSON Parse($json;Is object)
$event.uid:=$eventId
$event.title:=$vt_Titel
$event.startDate:=String($vd_terminDate;ISO date GMT;$vT_TerminZeitVon)
$event.endDate:=String($vd_terminDate;ISO date GMT;$vT_TerminZeitBis)
$error:=iCal Modify event (JSON Stringify($event))
end if
$error returns 0 but the event gets not changed.
Oh on repeat it return $error=2
Do I something wrong ?
I got it, I had to remove the empty parts to get it work:
OB REMOVE($event;"alarms")
OB REMOVE($event;"recurrence")
OB REMOVE($event;"attendees")
OB REMOVE($event;"url")
$json:=iCal Find event ($eventId)
If ($json#"")
$event:=JSON Parse($json;Is object)
$event.uid:=$eventId
$event.title:=$vt_Titel
$event.startDate:=String($vd_terminDate;ISO date GMT;$vT_TerminZeitVon)
$event.endDate:=String($vd_terminDate;ISO date GMT;$vT_TerminZeitBis)
OB REMOVE($event;"alarms")
OB REMOVE($event;"recurrence")
OB REMOVE($event;"attendees")
OB REMOVE($event;"url")
$error:=iCal Modify event (JSON Stringify($event))
end if
Hi, the ical Find event in your code use the event id as 1st parameter, your wiki description shows a json object.
The json return parameter for this object does not return the $event.uid. So I've add the $event.uid by myself.
Sample: $json:=iCal Find event ($eventId) If ($json#"") $event:=JSON Parse($json;Is object) $event.uid:=$eventId $event.title:=$vt_Titel $event.startDate:=String($vd_terminDate;ISO date GMT;$vT_TerminZeitVon) $event.endDate:=String($vd_terminDate;ISO date GMT;$vT_TerminZeitBis) $error:=iCal Modify event (JSON Stringify($event)) end if
$error returns 0 but the event gets not changed. Oh on repeat it return $error=2
Do I something wrong ?
I got it, I had to remove the empty parts to get it work: OB REMOVE($event;"alarms") OB REMOVE($event;"recurrence") OB REMOVE($event;"attendees") OB REMOVE($event;"url")
$json:=iCal Find event ($eventId) If ($json#"") $event:=JSON Parse($json;Is object) $event.uid:=$eventId $event.title:=$vt_Titel $event.startDate:=String($vd_terminDate;ISO date GMT;$vT_TerminZeitVon) $event.endDate:=String($vd_terminDate;ISO date GMT;$vT_TerminZeitBis) OB REMOVE($event;"alarms") OB REMOVE($event;"recurrence") OB REMOVE($event;"attendees") OB REMOVE($event;"url") $error:=iCal Modify event (JSON Stringify($event)) end if