Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Search Function
-
- Posts: 25
- Joined: Mon Apr 04, 2022 4:00 pm
- Has thanked: 1 time
Search Function
Hello, I was messing around and trying to figure out a way opposed to clicking the three lines in the top left and unchecking the rows/columns I want to exclude from the search query. Is there a faster simpler way to do such with adding a button or how can I by default just exclude rows without alerting ther search function. Say I want to only to search by site name and exclude contact phone number and address from the results.
-
- Posts: 25
- Joined: Mon Apr 04, 2022 4:00 pm
- Has thanked: 1 time
Re: Search Function
Thank you, seems when I add this under the custom code of the form page, it removes the use of my export to csv code. Im going to guess this some how needs seperated as a new function with in this section, the question I have not knowing php and trying to learn on the fly what syntax would be required to have both the custom sort, and export to csv working together?
Code: Select all
function base64encode(str) {
let encode = encodeURIComponent(str).replace(/%([a-f0-9]{2})/gi, (m, $1) => String.fromCharCode(parseInt($1, 16)))
return btoa(encode)
}
function browseDownloadToCSV() {
nuSetProperty('browse_sql', base64encode(JSON.stringify(nuCurrentProperties().browse_sql)));
nuRunPHP('BrowseDownloadToCSV');
}
if(nuFormType() == 'browse'){
nuAddActionButton('browseDownloadToCSV', 'Download to CSV', 'browseDownloadToCSV();');
}
if (nuFormType() == 'browse') {
$(window).scroll(function(e) {
var scrollTop = $(window).scrollTop();
$('.nuBrowseTitle').each(function() {
if (scrollTop > 0) {
$(this).css({ 'top': scrollTop, 'z-index': '100', 'position': 'fixed' });
} else {
$(this).css({ 'top': 3, 'z-index': '0', 'position': 'absolute' });
}
});
});
}
nuSetNoSearchColumns([4, 7, 9);
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact:
Re: Search Function
There's a syntax error:
replace
with
replace
Code: Select all
nuSetNoSearchColumns([4, 7, 9);
Code: Select all
nuSetNoSearchColumns([4, 7, 9]);