question

babakfakhriloo avatar image
0 Votes"
babakfakhriloo asked babakfakhriloo commented

issue in the provided sample js code for "Exercise - Write data with output bindings"

Hi

The sample js code provided in Exercise - Write data with output bindings, does not work for adding new item in collection. So the condition for checking if there is a already a bookmark with the requested id, can be changed to be :


" if(bookmark.id){ .... }"


azure-functions
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

VishalChandanshive avatar image
0 Votes"
VishalChandanshive answered babakfakhriloo commented

Can you try to check object exists before calling this condition?

  if(bookmark){...}


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

There is an issue with the sample provided by microsoft. The "bookmark" is not undefined or null if there is no corresponding item in database.

0 Votes 0 ·