Hi,
I have a dataset with 18 fields.
3 have been added recently.
For some reason when I am calling in a code a selected item:
$w("#Dataset").onReady(() => {
itemObj = $w("#Dataset").getCurrentItem();
console.log(itemObj);
});
The 3 added fields are no part the itemObj.
Can you please advise ? Is it a cache issue ?
Should I reset something ?
Thanks for your help
Regards,
Pierre-yves
Missing fields in the dataset:
{"_id":"db412872-11b9-4f36-8b66-4b85c96c3e35","title":"2018-02-14T13:34_LEG1","flightType":"roundTrip","flightStatus":"confirmed","from":"A Coruna Airport","to":"Afyon Airport","flightDate":"2018-02-14T23:00:00.000Z","hourTime":9,"minTime":0,"numberPassengers":3,"emailMember":"email","commentMember":"","_owner":"70a522fb-f025-42e4-b817-cb39a7c8fb36","_createdDate":"2018-02-14T13:34:58.180Z","_updatedDate":"2018-02-14T13:36:02.320Z","toOaci":"LTAH","fromOaci":"LECO"}
Hey, you can also load the current item from the db and merge the values before executing the update
Hello Shlomi,
I finally found out the problem which was quite straight forward.
It was because fields where empty then not included in the itemObj
Thus when I tried to updade, the code did not find them.
As workaround, I decided to force with default values then update, not really clean...
Thanks
pym
Hi pym,
can you please share the url of the site you are working on?
thanks,
Shlomi