top of page

Forum Posts

rebecca
Oct 03, 2022
In Coding with Velo
I have a page that has a Dataset on it. I am identifying the Filter on the dataset in code. On one particular display, I am getting duplicates in the repeater. There are no duplicates in the Collection. Can you assist me?
0
6
43
rebecca
Aug 11, 2022
In Coding with Velo
In our website designer using Content Manager, the Tags Field holding approximately 15 tag types, lost its dynamic list of those Tags already used in the database. Prior to this, its new Tag would dynamically add to the list. There are now none available. Does anyone know why this happened? And, how can I fix it?
0
2
130
rebecca
Jun 30, 2022
In Coding with Velo
I am trying to filter items in the Dataset with a user input date range. I have written the following code: $w.onReady(function () { const mymember = wixUsers.currentUser; const newDate = new Date() if (!mymember.loggedIn) { $w("#mymemberEmail").text = 'You must Log in!' } if(mymember.loggedIn === true) { mymember.getEmail() .then ((mymemberEmail) => { $w("#mymemberEmail").text = mymemberEmail console.log(mymemberEmail) $w("#datePicker2").value = new Date(newDate.getFullYear(), newDate.getMonth(), 1) $w("#datePicker3").value = new Date(newDate.getFullYear(), newDate.getMonth() + 1, 1) FilterDataSet(mymemberEmail) }) } }) export function FilterDataSet(mymemberEmail) { let date1 = new Date console.log(date1) let yearValue2 = $w('#datePicker2').value.getFullYear(); let monthValue2 = $w('#datePicker2').value.getMonth(); let dayValue2 = $w('#datePicker2').value.getDate(); let date2 = new Date(yearValue2,monthValue2,dayValue2,0,0,0); console.log(date2) let yearValue3 = $w('#datePicker3').value.getFullYear(); let monthValue3 = $w('#datePicker3').value.getMonth(); let dayValue3 = $w('#datePicker3').value.getDate(); let date3 = new Date(yearValue3,monthValue3,dayValue3,0,0,0); console.log(date3) $w("#datePicker2").onChange(() => $w("#dataset2").refresh) $w("#datePicker3").onChange(() => $w("#dataset2").refresh) $w("#dataset2").setFilter( wixData.filter().eq("email", mymemberEmail) .and(wixData.filter().ge("dateField", date2) .and(wixData.filter().ge("dateField", date3)))) $w("#dataset2").setSort( wixData.sort().descending("dateField")) } When I look at the console.log, this is what date2 and date 3 formats look like: But, when I look how the prior developer is storing the dateField in Content Manager, it looks like this. How can I get the elements of date1 and date2 to test against this type of date format? Thank you for your assistance.
Setting a Date range for a Dataset Filter content media
0
0
84
rebecca
May 25, 2022
In Coding with Velo
I have an export function calling to the Public Files that looks like this: export function myJourney(digitalClientName) { let myjourneyPic = '' let myjourneySubTitle = '' let myjourneyAltText = '' return wixData.query("Items1") .eq("title", digitalClientName) .limit(1) .find() .then( (results) => { if(results.items.length > 0) { let myjourneyPic = results.items[0].image.url let myjourneySubTitle = results.items[0].subtitle.text let myjourneyAltText = results.items[0].altText.text console.log(results) } else { console.log(results.items[0]) } return [ myjourneyPic, myjourneySubTitle, myjourneyAltText ] }) } I then have the front end using the return results, like this: await myJourney('digitalclientName') .then((Pic, SubTitle, AltTitle) => { $w('#myjourneyPic').background.src = Pic, $w('#subTitle').text = SubTitle, $w('#altTitle').text = AltTitle; }) if (($w('#myjourneyPic').background.src) === '') { $w('#myjourneyPic').background.src = "wix:image://v1/11062b_216a7c5a8f2e4ea0899a27af0efac648~mv2.jpg/_.jpg#originWidth=3360&originHeight=2240" $w('#image16').hidden }; I'm trying to debug and can't seem to find why the export function seems to be returning nulls on each item. Any ideas? Help much appreciated!
0
7
220
rebecca
May 13, 2022
In Coding with Velo
I have a dataset connected to a repeater. It isn't providing the right item with onClick() and getCurrentItem(). It always seems to be giving the first item in the displayed repeater from the dataset. Any ideas why? I have used similar code another website, and it works.
0
5
64

rebecca

More actions
bottom of page