top of page

Forum Posts

Michael
Jun 05, 2020
In Coding with Velo
Hello, I've been working with the media gallery field option in my databases and I see that I can add videos to my media gallery, only by uploading them directly to site storage (https://www.wix.com/corvid/forum/tips-tutorials-examples/you-can-now-add-video-to-media-gallery-field). This is hugh limitation because clients usually have videos uploaded to YouTube (or want to include videos from other accounts), and it is usually preferred to upload gallery videos from there. For example, Wix Pro Gallery allows to upload videos from youtube and vimeo, and therefore I can upload gallery videos from youtube manually through editor, but not through database which is uploading to my gallery. Is there a way to still add youtube videos through links to galleries that are connected to database? Maybe there is a way to add urls seperately in another text field and then add them using hooks?
2
2
177
Michael
Feb 03, 2019
In Coding with Velo
Hi, I have a table showcasing company employees, with every employee taking a post from Posts database. Setting the table with attributes is fine, however, now I want to allow search for employees based on post. I set up the search with a dropdown, but for the matter it could also be a text search. This is the code (for dropdown): export function filterPost_change(event) { //for posts database (there are more options) dropdownFilter($w('#datasetPosts'), $w('#filterPost').value, "postName"); } function dropdownFilter (dataset, value, reference) { //Find the requested value in requested Database and put it on current item //Then update main Database (EMPLOYEES) to include only items who include the specified item in their field for it for (var i = 0; i < dataset.getTotalCount() && dataset.getCurrentItem().title !== value; i++) { //continue until found matching index dataset.setCurrentItemIndex(i); // console.log(dataset.getCurrentItemIndex()); } // console.log(dataset.getCurrentItem()); var main = $w('#datasetEmployees'); // main.setFilter(wixData.filter().contains(reference, dataset)); // $w('#table').rows = main.getItems(); (I'm not sure if this is correct, didn't get to it yet) } This code is PILOT. PROBLEM here is that when I run dataset.setCurrentItemIndex(i) and check the current index then on console log I find that it always stays at 0!!! for this I can't set focus on the item I need! I tried using dataset.next() instead, but still same effect. Could you say how should I cange the function so it allows dropdown filter, perhaps from code that worked already? I already searched the forum and help but didn't seem to find solution for a case of dropdown filter with reference.
0
1
555

Michael

More actions
bottom of page