top of page

Forum Posts

Umut Cankurt
Mar 18, 2023
In Coding with Velo
Save page as PDF/download button feature request. This request and similarly many people have written articles and sought answers. And so far no tangible solution has been produced...... now someone finds a solution. The year is 2023, isn't such a simple solution added yet, is it that difficult?
0
0
6
Umut Cankurt
Jan 26, 2021
In Coding with Velo
Hi; How can I use and or together in the same query. for example; something like this but this is not working. query1.and((query2).or(query4)).and(query3).and(query5) Could you please share an example. #query #or #and
1
2
35
Umut Cankurt
Dec 09, 2020
In Coding with Velo
both but my code works. But the search conditions for the 1st code are better because it is not case sensitive and lists results that contain a few words. For example, if there are 3 words written in the word, list (box supply paint) lists the 3 words specified in the text, if any. 2. The filtering feature of the code is good, I can list the word search results with filtering. As a result, I want to combine the search feature of the 1st code and the search result filtering of the second code. How can I get someone to combine it for me? 1. Code import wixData from 'wix-data'; export function searchButton_onClick(event) { //assume the input comes from a component called 'searchInput' //CHANGE TO YOUR SPECIFIC COMPONENT NAME let searchValue = $w('#SearchBox').value; //split the search inputs into distinct words let searchWords = searchValue.split(' '); //build a query for 'my-collection' //CHANGE THIS TO YOUR COLLECTION NAME let query = wixData.query('SouthAfrica') .descending("overview"); //add a "contains" condition to the query for each word: //assumes we search in the field 'myField' //CHANGE THIS TO YOUR FIELD NAME for (let i=0; i < searchWords.length; i++) { query = query.contains('overview', searchWords[i]) } //actually run the query: query.find().then(res => { //give the results to the table to display //assume the table is named 'resultsTable' //CHANGE TO YOUR SPECIFIC COMPONENT NAME $w('#repeater1').data = res.items; }) .catch(err => { console.log("problem in search! " + err); }); } 2. Code import wixData from 'wix-data'; $w.onReady(function () { //TODO: write your page related code here... loadContinents() }); function loadContinents () { wixData.query("Continents").limit(1000).ascending("continents").distinct("continents").then((results) => { let distinctList = results.items.map(element => { return {label: element, value: element};}) distinctList.unshift({"value": "", "label": "All Continents"}) $w("#Continents").options = distinctList }) } //////////////////////////////////////// let lastFilterKeywords; let lastFilterContinents; function filter (keywords, continents) { if (lastFilterKeywords !== keywords || lastFilterContinents !== continents) { let newFilter = wixData.filter(); if (keywords) {//this will check to see if there are any value for keywords newFilter = newFilter.contains("overview", keywords) } if (continents) { //this will check to see if there are any value for continent newFilter = newFilter.contains("continents", continents) } $w("#dataset1").setFilter(newFilter); lastFilterKeywords = keywords; lastFilterContinents = continents; } } let onTime; export function sKeyword_keyPress(event) { //Add your code for this event here: if (onTime) { clearTimeout(onTime) onTime = undefined; } onTime = setTimeout(() => { filter($w("#sKeyword").value, lastFilterContinents) }, 10) } export function Continents_change(event) { //Add your code for this event here: filter(lastFilterKeywords, $w("#Continents").value); } #search #filter #searchandfilter #code #filtering
1
2
289
Umut Cankurt
Dec 09, 2020
In Coding with Velo
Hi; Have a new site member change their member role with a timeout I just want a member who is newly registered on my website to be automatically assigned a role and change their membership role after the specified time. For example; - new visitor becomes a member of the site - The new member is automatically assigned to the global named member role. - member role automatically changes to general group role after 1 day / 24 hours. #role #member #timeout #automatically #rolechange #change
0
1
24
Umut Cankurt
Dec 07, 2020
In Coding with Velo
users create a mail alert for the word searched in the database (it should run once a day or when a new record is added) or an rss alert for the word the user is searching for.In summary, when new entries are added to the database of the site members, I want to send a notification by email or rss if a notification has been created for the specified word. #rss #emailalert #savesearch #newrecord #database #sendmail how can I do it ? and sample code, video, or anything you share to learn is fine.
1
0
43
Umut Cankurt
Jul 23, 2020
In Coding with Velo
When users click on the page links I share, the page opens but it is directed to the home page within 3 seconds. So they can't stay on the link page they open. I don't want it to work that way. I share the link of someone who has experienced similar problem before. My problem is I tried the same method shown, this condition is not valid for me. I don't use multiple languages. Is there another reason? what should i look for and how do i solve the problem. Please help https://www.wix.com/corvid/forum/community-discussion/page-links-in-site-redirecting-to-homepage
1
1
103
Umut Cankurt
Jul 19, 2020
In Coding with Velo
Hi; I want the light box to be closed only with the close button. What should I do about this or can you send a sample page code? Currently, except for the close button, the user can close by clicking esc or any space. I just want it to close with the close button. Alternatively, I found a code, but that code doesn't do exactly what I want. Because the box never closes. here is the code import wixWindow from 'wix-window'; $w.onReady(function () { //TODO: write your page related code here... neverExit(); }); function neverExit() { wixWindow.openLightbox('Premium') .then((data) => { if (!data || !data.forceExit) { neverExit(); } }); } Actually what I want to do is; 1- Log in lightbox (requests the visitor to be a member or log in.) If a member is logged in, the lightbox will not appear on the page 2- If the member role is not premium, the premium lightbox will be opened. If the member role is premium, the light box will not be opened. A sample code or a redirect that will enable lightboxes to open as I wish will be useful to me. #userrole #role #lightbox
1
6
940
Umut Cankurt
Jun 30, 2020
In Coding with Velo
Hi; I have a search page that searches from the database. the feature I want to add; - to show which word comes from the repeater (multiple words) for the searched words for example; searched words; construction and electrical works 1- construction building repair ------ contains the word: construction 2- construction and electricity ------ contains the word: construction, electricity 3- electrical works and repair ------ contains the word: electricity, works my current search page code (How do I add the feature I mentioned? I would be glad if you can share an example on this subject.) import wixData from 'wix-data'; export function searchButton_onClick(event) { let searchValue = $w('#SearchBox').value; let searchWords = searchValue.split(' '); let query = wixData.query('SouthAfrica') .contains('overview', searchWords[0]); for (let i=1; i < searchWords.length; i++) { query = query.or(wixData.query('SouthAfrica') .contains('overview', searchWords[i])); } query.find() .then(res => { $w('#resultsTable').rows = res.items; }); } #search #filter #multiple #words #searchWords #query #searchValue
1
1
40
Umut Cankurt
Jun 29, 2020
In Coding with Velo
Hi; What is the code to add to the page to share repeater data in XML with the rss feed? or is there an example on this subject?
1
2
196
Umut Cankurt
Jun 28, 2020
In Coding with Velo
Hi; to the current search code below; - I want to search for each word written in the database separately. For example: paris eat cake - search (food and cake paris) should list the results even in the case of words. - I want to list all the results if one or more of them are in the text. My current code is below. Can you send it back by adding the search feature I mentioned. Note: I tried it in many different ways, but it didn't. I would be glad if you could edit it for me as an example of the current code. import wixData from 'wix-data'; $w.onReady(function () { //TODO: write your page related code here... }); let debounceTimer; export function searchBar_keyPress(event) { let str = 'searchBar'; let words = str.split(" "); console.log('searchBar'); const filterValue = ("words").value const byOverview = wixData.filter().contains("overview", filterValue) $w("#germany").setFilter(byOverview) $w("#loadingGif").show(); if (debounceTimer) { clearTimeout(debounceTimer); debounceTimer = undefined; } debounceTimer = setTimeout(() => { $w("#germany").setFilter(wixData.filter().contains("overview", $w('#searchBar').value) .or(wixData.filter().contains("projectTitleDescription", $w('#searchBar').value) .or(wixData.filter().eq("country", $w('#searchBar').value)))) .then(() => { count(); }) }, 50); } #searchbar #filter #wixdata #eq #or #split #multiple #multiplewords #words #searchdata #search #addcode
1
6
292
Umut Cankurt
Jun 23, 2020
In Coding with Velo
Hi; I have an existing calling code that works fine. But I want to search a few words at the same time. (within the same search reference column, that is, the place to search one by one) For example: car, blue, black, truck If possible; I want to add additional functions to the search bar, for example, the two options below. When the user wants to make a call, when one of the two options is ticking his box, he should be able to make multiple calls according to the condition he has marked. - containing all - or containing any This is how I make a search bar. Do you have a sample code? The example helps me a lot since I am a novice in code. Thank you #search #searchbar #manywords #wordssearch #orsearch #containingall #searchdatabase #database #examplecode #code
1
15
378
Umut Cankurt
Jun 22, 2020
In Coding with Velo
Hi; I add csv files to my wix database, since the number of records is high, I cannot delete or compare them one by one. I transfer the data in the csv file that I update everyday. But I do not want to reload the data I transferred the previous day. Each record must be unique. Do you have a sample code? such as automatic deletion of duplicate records or ignoring file upload I'm trying the two codes below but I couldn't. Where's my fault? How should I do a sample code or educational video about it? I want to prevent repeated records in the database. It is not possible to manually check or delete the CSV file every day, since there will be more records in the file, which will contain repetitive records every day. Please help with this. Thank you Note: The column where I check the duplicate records is the original link url address / column with url content. https://stackoverflow.com/questions/62465609/how-to-prevent-or-delete-duplicate-records-in-csv-file-import-process-to-wix-dat reference column for comparison : OriginalConnectionDetails (By comparing url addresses, I do not want to add the existing record back to the database while transferring the csv file if it was added to the database before.) Database : Germany Example Code-1 import wixData from 'wix-data'; export function searchForDuplicates(value) { return wixData.query("Diamond") .eq("giaCode", value) .find() .then((results) => { return results.items.length; }) .catch((err) => { let errorMsg = err; }); } export function Diamond_beforeInsert(item) { return searchForDuplicates(item.giaCode).then((res) => { if(res > 0) { return Promise.reject("Duplicate"); } return item; }); } --------Example Code-2 import wixData from 'wix-data'; export function searchForDuplicates(collection, field, item) { // info contains the hook context // use the collectionName property to use function for multiple collections return wixData.query(collection) .eq(field, item[field]) .find() .then((results) => { return results.items.length; }) .catch((err) => { let errorMsg = err; }); } export function Germany_beforeInsert(item, context) { // Calls routine to check if value already exists in the collection. // If value not found, then save record. // Else, if value is found, then reject this insert to prevent duplicate values. // Note: concurrent inserts may result in duplicates. // Pass context to searchForDuplicates to use for multiple collections. return searchForDuplicates(context.collectionName, "OriginalConnectionDetails", item).then((res) => { if(res > 0) { return Promise.reject('This item already exists'); } return item; }); } #database #duplicate #csv #csvimport #databaserecorddelete #delete #duplicatedelete
1
3
448
Umut Cankurt
Jun 21, 2020
In Coding with Velo
Hi; I have several databases of the same structure and format. For example; - Germany collection - France Collection - Italy Collection. Is it possible to make the word entered in a single search bar as a common search page for all? how can I do it. Can you send a sample code. This will be very useful to me. Since the databases are all in the same format, it should be easy to search, all I want is to search the same word with a single search bar and show the results in one repeater. Multiple databases search and merge results on the same page? How to do it. Sample code request - Databases have the same columns. #database #search #different #repeater #searchall #code
0
13
553
Umut Cankurt
Jun 17, 2020
In Coding with Velo
Hi; I add csv files to my wix database, since the number of records is high, I cannot delete or compare them one by one. I transfer the data in the csv file that I update everyday. But I do not want to reload the data I transferred the previous day. Each record must be unique. Do you have a sample code? such as automatic deletion of duplicate records or ignoring file upload
1
5
267
Umut Cankurt
Jun 10, 2020
In Coding with Velo
Hi; I did a lot of research on this subject but I could not find a definitive solution. (I am not a software expert and I do not have code knowledge ... unfortunately) Actually, there are many close solutions or a subject written about it, but nobody has explained it with a clear solution or result. wix database disadvantages; 1- delete data or copy and paste restricted operation 2- There is no automatic repetitive comparison in csv loading. such an option must be at least for the specified column. 3- There should be simple modules that make the job easier for all types of users, but you must either know a good level of code or hire someone. This is deviating from the wix mission because if I hire someone, why should I deal with it? I would give the website to do it to someone as a whole package business, right? The airtable has many advantages and is constantly renewing itself. But he has his own disadvantages. As a result, the combination of wix and airtable can create great work. just a solution that will provide the need wix and airtable connection. but how ? https://www.npmjs.com/package/gatsby-source-airtable https://awesomejs.dev/for/gatsby/pkg/258254208451478026/ https://dev.to/sethu/how-to-build-a-website-using-gatsby-airtable-in-30-mins-42gm https://www.digitalocean.com/community/tutorials/gatsbyjs-using-airtable-with-gatsby There are some methods in this regard, but they are advanced for me. There is an airtable and gastby module in wix, but I don't know how to proceed or combine solutions including the solutions I sent as an example. If you write me a solution that I can do step by step, I would be very pleased. I'm sure it helps a lot of people. thanks for helping
use as airtable back databases and as wix database collection link or airtable wix database synchronization ? content media
2
6
1k
Umut Cankurt
Mar 20, 2019
In Coding with Velo
Hello there; We can edit roles and access privileges according to groups on member-specific pages. But I am looking for a solution; If a page is open to public visitors (with new visitors) (with restricted access), is it possible for members from the members to work according to the access role? I would like to hide a certain part of the page with the strip and give access according to the membership type to redirect new visitors to membership. but as far as I can see, I couldn't do both at the same time. How can I do it. I can set a page according to the roles of the members as well as show them to some of the public visitors. I need help for an example or code
0
2
172

Umut Cankurt

More actions
bottom of page