I got the same problem and wasn’t able to fix it with this helpsheet. Can anyone help?
import wixData from 'wix-data';
import wixLocation from 'wix-location';
$w.onReady(function () {})
export function SubmitStory_click(event, $w) {
$w(" #uploadPicture").startUpload()
.then( (uploadedFile) => {
return uploadedFile.url;
})
.then( (resultUrl) => {
console.log(resultUrl)
$w("#button1").onClick(() => {
let At =
$w("#Art").value;
console.log(At)
let Rn =
$w("#Ringnummer").value;
console.log(Rn)
let Fr =
$w("#Farbreihe").value;
console.log(At)
let Fs =
$w("#Farbschlag").value;
console.log(Rn)
let Gs =
$w("#Geschlecht").value;
console.log(At)
let Ze =
$w("#Zeichnung").value;
console.log(Rn)
let GD =
$w("#datePicker1").value;
console.log(At)
let Zt =
$w("#Zutraulichkeit").value;
console.log(Rn)
let Zü =
$w("#Zuchter").value;
console.log(Rn)
let Pr =
$w("#Preis").value;
console.log(At)
let Ti =
$w("#Titel").value;
console.log(Rn)
let Kb =
$w("#Kurzbeschreibung").value;
console.log(Rn)
let Lb =
$w("#Beschreibung").value;
console.log(At)
let input = {
"Art": [At],
"Ringnummer": [Rn],
"Farbreihe" : [Fr],
"Farbschlag": [Fs],
"Geschlecht": [Gs],
"Zeichnung": [Ze],
"Geburtsdatum": [GD],
"Zutraulichkeit": [Zt],
"Züchter": [Zü],
"Preis": [Pr],
"Titel": [Ti],
"Kurzbeschreibung": [Kb],
"Beschreibung": [Lb],
"bilder": resultUrl,
"art": [At],
"ringnummer": Rn,
"farbreihe" : Fr,
"farbschlag": Fs,
"geschlecht": Gs,
"zeichnung": Ze,
"zutraulichkeit": Zt,
"züchter": Zü,
"preis": Pr,
"titel": Ti,
"kurzbeschreibung": Kb,
"beschreibung": Lb,
"Id": $w("#input1").value
}
wixData.insert("Bestand",input)
})
});
}
I didn’t find any other solution but to store all my data twice as a JS and as a “normal” file because I need to run a querry with user inputs and the querry always counts the user input as a JS file and can’t find any matches if I don’t use Js files. On the other hand I need to use normal files because of my dynamic page.
If someone is interested in fixing this problem:
import wixData from 'wix-data';
export function dropdown1_change(event) {
console.log($w("#dropdown1").value)
wixData.query("Wellensittiche")
.eq("Art",$w("#dropdown1").value)
.find()
.then( (res) => {
console.log(res);
});
}
I really hope you can help me with my first problem because I’ve been sitting on this for a long time now and I don’t want to start all over again.