Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Want search form to initially to be blank

Questions related to using nuBuilder Forte.
Post Reply
icoso
Posts: 181
Joined: Sun Feb 07, 2021 11:09 pm
Been thanked: 1 time

Want search form to initially to be blank

Unread post by icoso »

Im New to nuBuilder. Have been reading the documentation. (Not written for newbies) and have watched several videos. (Moves way too fast and doesn't really explain details - too many assumptions). Have read the wikis (Not much useful) and looked at all the Pizzas.

So Far Ive accomplished creating a customer table, with a simple lookup table (i guess in nuB terms its called a Select not a Lookup) on the State field. (couldn't import a csv list of state names and abbreviations, because of the self imposed States_Id field that nuB automatically added to the States table). Had to manually enter the States info. I've also managed to use the Fast Forms, format some fields, arrange them( finally figured out where to get to the arrange function - not in manuls), manually changed the CSS to adjust the fonts on input fields and labels (woefully lacking), but still have a few questions.

Since this is tagged as Better than Access (??? - implementing "lookup" fields alone is a struggle here...) here are a few simple things that can be done in access that seem to be like pulling hairs out to accomplish here:

1. Lookup fields or Select field - I still not sure what you intend a "lookup" field to be and how it differs from a select field, except in maybe the way it pulls in data via the SQL statement. The videos nor the manual do a good job at explaining this concept. Case in point adding a simple lookup table on my State Field in my Customer Table, was nothing short of an educated guess and trial and error. Even the SQL statement I used to get the data I wanted (from two fields, the state abbreviation and state name, ie: AZ for Arizona. This doesn't really make sense how the nuB imposed ID field comes into play. (NOTE: My next form has about 10 lookup (select) fields, and I have NO idea how im going to get all those linked. In Access this is point and click easy to do and I fully understand that nuB has much greater flexibiilty and functionality, but the manuals/videos/wikis really need to do a much better job.

2. The "Search Form" For my customer table, that I used Fast Forms Builder to create, Im trying to figure out how to make my search form NOT automatically display all my records (the auto generated SQL statement that says "Select * from customer" is whats causing this. But I can seem to change this or leave it blank, because then my actual search doesn't work. So whats the point of having the SQL even on the search form properties under browse, if it cant be changed? I simply want to be able to come into to search and have no records displayed until I actually type something in the search box and click search. OR another neat feature would be the ability to incorporate an active search as a I type in characters in the fields. I've done this elsewhere by writing my own PHP code to accomplish it. Here is a link on how to accomplish it. https://www.w3schools.com/php/php_ajax_livesearch.asp Any ideas how to make the search blank initially until I actually click search would be greatly helpful.

After searching for my "Customer" and selecting them on the search form and it opens the Edit form, how do i: 1. Make this a NON-Editable form, until I actually click a button or something to allow me to edit the fields, EXCEPT the priamry search field, (ie: the persons SSN)? 2. Include a list of records from another table (orders) that this customer has previously created, IE: kind of like a search form embedded in the customer details form. (DO I use a subform and link that to a search form for the orders table? IF so, the same applies. When I click the order number, I don't want to be in an edit mode, unless I click a button to do so. Like this:

=====================
Customer Info details form:
SSN, Name
Address, City, State Zip
Phone1 Phone2 etc...
=====================
Orders:
ordernum1 orderdate Totamount1
ordernum2 orderdate Totamount2
ordernum3 orderdate Totamount3
=====================
Then If I click on ordernum1 a new form (non-editable) opens up with the Customer Info detail and the Order Details...unless I click an edit button.

Any ideas how to accomplish this and/or at least point me in the right direction (besides watch video / read manual) would be greatly helpful. I think Once I get past these two hurdles I'll be heading in the right direction...

Thanks for any guidance you might provide....
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Want search form to initially to be blank

Unread post by kev1n »

icoso wrote:Im New to nuBuilder. Have been reading the documentation. (Not written for newbies) and have watched several videos. (Moves way too fast and doesn't really explain details - too many assumptions). Have read the wikis (Not much useful) and looked at all the Pizzas.
I would start with the User Guides:
https://sourceforge.net/projects/nubuil ... f/download
https://sourceforge.net/projects/nubuil ... f/download
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Want search form to initially to be blank

Unread post by kev1n »

The "Search Form" For my customer table, that I used Fast Forms Builder to create, Im trying to figure out how to make my search form NOT automatically display all my records (the auto generated SQL statement that says "Select * from customer" is whats causing this
I use this "trick" to start with a blank Search Form:

JavaScript in Custom Code:

Code: Select all

if (nuFormType() == 'browse') {
   $('#nuSearchField').on('change keydown paste input propertychange click keyup blur', function() {
       nuSetProperty('SEARCH_FIELD', this.value );   
  })
}
Browse SQL:

Code: Select all

SELECT * FROM mytable WHERE LENGTH('#SEARCH_FIELD#' ) > 2 AND
LEFT('#SEARCH_FIELD#', 1) <> '#'
I'll try to answer your other questions later.
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Want search form to initially to be blank

Unread post by kev1n »

icoso wrote:1. Lookup fields or Select field - I still not sure what you intend a "lookup" field to be and how it differs from a select field, except in maybe the way it pulls in data via the SQL statement.
A Lookup field provides more "features" than a select object. It's explained in detail in the User Guide (Starting from page 55):
https://sourceforge.net/projects/nubuil ... f/download
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Want search form to initially to be blank

Unread post by kev1n »

PS: It's better not to ask multiple questions in the same thread, it's hard to follow and it makes it difficult to respond to each question.
It also makes it harder for other to find information when the thread title doesn't reflect the content.
icoso
Posts: 181
Joined: Sun Feb 07, 2021 11:09 pm
Been thanked: 1 time

Re: Want search form to initially to be blank

Unread post by icoso »

Thanks Kev1n. As I mentioned, I have done that (see the 1st sentence) and "(besides watch video / read manual) ". They're not much help in providing specifics on how to do the things I specifically discussed. They cover the overview but lack in details. Can you point out in the manuals where it discusses adding simple formatting masks to number fields for things like SSNs, telephone numbers, etc??? I even set the phone numbers to be "Telephone" in an Object details page somewhere (not sure how I got there , just clicking around-again not covered in manual...)

Or how to implement a lookup table (Im still wondering why you call a "lookup" field or a "selection" or what the true difference is). I watched the videos (they might as well been on double speed), I read the manuals (several times) I searched for "lookup" in the manual and read every section several times. In none of them does it even state to double click on the label name while in the Form to get to the object properties. I found it by accident.

Here is my page 55 of the User Manual...v2.0

Procedures....
nuBuilder Forte can create Procedures.
A Procedure is PHP code run to manipulate the database.
Procedures are written in PHP to do things to the database directly.
Here are 2 examples of where a Procedure can be used.
1. To create the tab le used in a Report.
2. Update a stock table after an invoice is created in nuBuilder.
.
.
.
I don't think this is it. But I digress, I have to look at the "Old" manual.. So I read the Lookup section. As I thought the terminology is off to what Im used to. Maybe its a regional thing. A lookup field for what Im used is nothing more than used for field validation, not linking a one to many table view. Its a simple validation for a field, like a State field. In the US there are 50 states + a few territories, ie: DC, Puerto Rico, Samoa, etc... SO instead of letting a user type cA for California the lookup field is used for validation to control what can be entered... The lookup uses data from another table(ie: States Table, with State ID (CA) and State Name (California). Thats its. I think you refer to this as a "Select" input type. MS Reference for Lookups: https://support.microsoft.com/en-us/off ... 391c42f239

Can you point to where in any of the manuals or videos it shows how to link a search list (like I discussed in item 2) to a Customer form? I've even searched these forums over and over and read numerous threads but can't find anything on either of these basic topics. I really appreciate your help on these. this appears to be in the OLD manual too. I'll keep reading through it.... Thanks for the direction...
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Want search form to initially to be blank

Unread post by kev1n »

icoso wrote:Here is my page 55 of the User Manual...v2.0

I don't think this is it. But I digress, I have to look at the "Old" manual..
Yes, that's why I added the link to the "old" manual as well (see my post above)
icoso wrote: In none of them does it even state to double click on the label name while in the Form to get to the object properties. I found it by accident
It's also in the old manual (p. 47/48). I found it by ctrl+f and searched for "double"
Post Reply