top of page
Forum Posts
pierreyvesmeyer
Dec 29, 2020
In Coding with Velo
I read some articles but unable to understand the real issues… I built a Repeater dropdown which is working well on my site except on mobile mode. On Mobile Preview Mode, I can see the dropdown But when I publish and try on my mobile, I cannot see the dropdown I tried via safari and Firefox mobile and it does not work... Thanks for your help Regards, Pierre-yves
0
0
14
pierreyvesmeyer
Apr 22, 2018
In Coding with Velo
I have a dataset which is unusable, when trying to modify fields, or duplicate or delete data, I have a couple of errors. This is quite critical because I have the error when directly working in the dataset or when users are in the application. The support proposed to me different solutions which are not working (try another connection, try another browser, try another PC, etc…) Here is a list of errors I met: Does anyone encounter these errors? In the web developer console on firefox, I see the below message when I got the error: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] Does anyone know what does it mean? Many thanks for your help Regards, Pierre-yves
0
2
33
pierreyvesmeyer
Apr 12, 2018
In Coding with Velo
Hello, I have got a performance issue on a page which loads data from dataset. A first query using email is searching data from Table 1 Then information from table 1 is use to query another Table 2 with a setFilter. Unfortunately, the code is not correct as it is too long to show final information… Does anyone have an idea how I can improve the below code? Thanks Regards, Pierre-yves Meyer $w.onReady(function () { user.getEmail().then((email) => { let userEmail = email; $w("#email").text = userEmail; // Selection company wixData.query("clientDataset") //select the client .eq("userStatus", "active") .contains("title", userEmail) .find() .then((results) => { let items = results.items; let company = items[0].userCompany; //select company from client console.log(items); // Selection flights per company $w("#flightDataset").setFilter(wixData.filter() //select final data .contains("userCompany", company) .hasSome("flightStatus", "submitted", "confirmed") .ne("flightVisible", "N") ) .then(() => { console.log("Flights Dataset is now filtered"); }) .catch((err) => { console.log(err); }); }) .catch((err) => { let errorMsg = err; console.log(errorMsg); }); }); });
0
5
425
pierreyvesmeyer
Apr 10, 2018
In Coding with Velo
Hello, I have a problem with the design of some pages. For some reason, I am losing align text. Text position is changing position without any manual intervention See below example: Status was previously aligned with the text box confirmed. Idem category previously aligned with member. Regards, pym
0
2
44
pierreyvesmeyer
Mar 03, 2018
In Coding with Velo
Hello, On my first page just after loggin, for some reason, the code is not applied… If I reload the page manually (just click enter in the URL, the code is working!) See below just to hide or show a button depending to a wixdata query. Thanks regards Pierre-yves $w.onReady(function () { let user; user = wixUsers.currentUser; $w("#adminButton").hide(); user.getEmail().then((email) => { let userEmail = email; $w("#email").text = userEmail; let count; wixData.query("clientDataset") .eq("title", userEmail) .eq("userStatus", "active") .hasSome("userType", "pilot", "system") .find() .then((results) => { //console.log(results); count = results.totalCount; //console.log(count); if (count >= 1) { $w("#adminButton").show(); // NOT WORKING ON FIRST LOAD – WORKING WHEN RELOADING URL } else { $w("#adminButton").hide(); } }) .catch((err) => { let errorMsg = err; console.log(errorMsg); }); }); });
0
17
219
pierreyvesmeyer
Feb 27, 2018
In Coding with Velo
Hello, My dataset are completely similar between live and sandbox I have an issue with below code which is working well in test: For my test I hardcoded the variable userEmail The below filter is working well in test and not in prod… Any idea what’s going on ? Thanks for your help Pym let userEmail; userEmail = "XXXX"; export function packageDataset_ready() { wixData.query("clientDataset") .eq("userStatus", "active") .contains("title", userEmail) .find() .then((results) => { let items = results.items; let company = items[0].userCompany; $w("#packageDataset").setFilter(wixData.filter() // does not filter anything in prod.... .contains("userCompany", company) ) .then(() => { console.log("package Dataset is now filtered"); }) .catch((err) => { console.log(err); }); }); }
0
0
57
pierreyvesmeyer
Feb 22, 2018
In Coding with Velo
Hello, I am sending email via sendGrid which is working well. But I am only able to send basic email with simple text. Have you got examples to send enrich HTML email in the body ? sendEmailWithRecipient(subject, body, recipient); Thanks for your help Regards, Pym
0
1
369
pierreyvesmeyer
Feb 19, 2018
In Coding with Velo
A have a field Date and Time format in a table. Unfortunately, I can’t see the time and I did not find a setup way to put the time visible. Any advise? Thanks for your help. Regards, Pym
0
6
786
pierreyvesmeyer
Feb 16, 2018
In Coding with Velo
Hi, I have a dropdown, the selection is connected to a dataset where there are 1438 lines. For some reason, when using the dropdown, I can only see the first 997 lines, the rest is missing ??? Is it a bug ? Is there a fix or workaround ? Thanks for your help. Regards, Pierre-yves
0
1
77
pierreyvesmeyer
Feb 14, 2018
In Coding with Velo
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"}
0
3
125
pierreyvesmeyer
Feb 14, 2018
In Coding with Velo
Hi, I have a dataset A with a field “date” and a field “status” I want to be able to update the status to the value “pending” when the field “date” equals to Today. This action is not before any insertion, update, delete, etc… Thus, I guess I can’t use Hook ? Any advise about this request ? Thanks for your help Regards, pym
0
4
277
pierreyvesmeyer
Feb 13, 2018
In Coding with Velo
Hello, I have an inserted line with a field named “from” in a dataset A My requirement is to fill another field named “fromOACI” in the same dataset A from another dataset B Dataset A: Dataset B: I want the hook after insert be able to populate automatically the field “fromOACI” from the Dataset A. In my example I am expecting the field fromOACI to get the value “LECO” Unfortunately this is not working, I get the error: Hook afterInsert for collection flightDataset result ignored! Expected hook result to resolve to an object with an '_id' property, but got [Undefined] Thanks for your help. Regards, Pym export function flightDataset_afterInsert(item, context) { ... wixData.query("airportDataset") // airportDataset = Dataset B .eq("airportName", item.from) .find() .then((results) => { let toUpdate = { "_id": item._id, "fromOACI": results[0].oaci }; wixData.update("flightDataset", toUpdate) // flightDataset = Dataset A }) .catch((err) => { let errorMsg = err; console.log(errorMsg); });
0
1
1k
pierreyvesmeyer
Feb 13, 2018
In Coding with Velo
Hello, I just want to be able to store the result of a query in a variable and unfortunately it did not work. I know the query is finding a value because when I put a console.log inside the query it is working. But unfortunately when I move the console.log outside, it is not working… let airportFrom = $w("#selectionAirportFrom").value; let itemAirport; wixData.query("airportDataset") .eq("airportName", airportFrom) .find() .then((results) => { let items = results.items; itemAirport = items[0].oaci; }) .catch((err) => { let errorMsg = err; console.log(errorMsg); }); console.log(itemAirport); /// -> ItemAirport is not visible in the console Thanks Pym
1
6
851
pierreyvesmeyer
Feb 13, 2018
In Coding with Velo
Hello, I have an insertion with a field “from” coming from a dropdown object with a list of airport. This field is connecting to a list: 📷 The client is selecting the airportName. I want to be able to insert the oaci field instead of airportName. How can I select on the first field and insert on the second field via javasript? let flightLeg1_toInsert = { "flightStatus": "submitted", "from": $w("#selectionAirportFrom").value, …}; Thanks pym
0
0
112
pierreyvesmeyer
Jan 31, 2018
In Coding with Velo
Hello, Does anyone already use the google Oauth 2.0 ? I want to insert an event via api in google calendar but I need first to make a authentication request before inserting my event. Unfortunately, I did not succeed to submit an authentication. Any advise ? Thx pierre-yves My fetch is: const url = "https://accounts.google.com/o/oauth2/v2/auth"; const request = { "redirect_uri": "https://www.think4jet.com/test-html", "response_type": "=code&", "client_id": "MY_CLIENT_ID", "scope": "https://www.googleapis.com/auth/calendar" }; return fetch(url, request); .then(response => console.info(response.json()));
0
5
1k
pierreyvesmeyer
Jan 29, 2018
In Coding with Velo
Hello, Does anyone already connect to the google API third partie service ? I tried without success to connect to the google API using the sendgrid example but this is too complicated to me… Do you know where I can find a example with explain with details how I can authenticate and use the google API Many thanks for your help Pierre-yves
0
8
3k
pierreyvesmeyer
Jan 28, 2018
In Coding with Velo
I have a form to book a flight with standard fields: Flight date, from, to , flight hour, flight min, etc… My request is from all the information's I get from clients, I want to create an event in a google calendar when the client click on submit the flight ? Any ideas how I can deal this quite complex requirement ? Many thanks Pierre-yves
1
15
1k
pierreyvesmeyer
Jan 25, 2018
In Coding with Velo
Hi, I have a form with different input from user some of them with general settings set to Required For some reason, when clicking on submit, the page is going to the link “when successful, navigate to…” even all the required fields have not been filled… I am expecting to be stuck on my page with all required field in red… Any ideas when the issue is coming from ? Thx Regards, Pierre-yves
0
1
80
pierreyvesmeyer
Jan 25, 2018
In Coding with Velo
Hello, Here is my request: I am building a page to book flight with a standard setup; Inputs are based on the fields (departure, destination, day of departure, time, etc…) When the client create a one-way journey and submit his request, I have one line created in a dataset. (Via a link connects to submit) For a round-trip, I would like to be able to create 2 lines in my dataset: One the departure and the other the return? Any ideas how I can create 2 entry in a database with one submission? Via a hook? Thanks for your help. Regards, Pierre-yves
0
2
168
pierreyvesmeyer
Jan 21, 2018
In Coding with Velo
Hi, I have a table which is showing selected data from a dataset To update few fields from a selected line in the table, I created text fields connected to the dataset fields. For a date field, I would like to change the format a the date because too long. How can I change the format ? Thx for your help Regards, pym
0
3
740
pierreyvesmeyer
More actions
bottom of page