Page 1 of 1

Database question

PostPosted: Fri Jun 05, 2015 9:30 am
by stevec
I am trying to create a database with the following data using the NeobookDB plugin
Fields:
Loaner
User
PCName
Date out
Date In
Reason
Out
In

I have a few questions:

1. Is it possible to have the Out and In as check boxes and have the Query search on those records that are (for example) 'checked in?

2. I am currently using the dbfind to find the records of the #, but the show is showing all the results, not just the requested number.

Thanks;
SteveC

Re: Database question

PostPosted: Fri Jun 05, 2015 9:51 am
by Neosoft Support
1. Is it possible to have the Out and In as check boxes and have the Query search on those records that are (for example) 'checked in?


NeoBookDB can only show boolean fields in the grid as true or false. NeoBookDBPro will show boolean fields with a checkbox.

2. I am currently using the dbfind to find the records of the #, but the show is showing all the results, not just the requested number.


Use dbfQuery instead if you want to see only records that match the search criteria. However, if you only want to show a single record, then you should use a form instead of a grid. A form shows the contents of the current record using NeoBook objects. See "Creating Database-Enabled Publications" in the NeoBookDB help file for information about creating a form.

Re: Database question

PostPosted: Fri Jun 05, 2015 10:12 am
by stevec
Thanks Dave;

I updated Windows to open the help file, I tried the dbfquery, and was only getting syntax error.

any hint on using "NeoBookDB can only show boolean fields in the grid as true or false. NeoBookDBPro will show boolean fields with a checkbox."

Thanks;

Re: Database question

PostPosted: Fri Jun 05, 2015 10:25 am
by stevec
Got the query to function to work. Thanks Dave

Code:
dbfQuery "PDSLoaner.dbf" "PDSLoaner=[CB2]"
If "[dbfQueryResult]" ">" "0"
AlertBox "Hello" "I found [dbfQueryResult] records."
Else
AlertBox "Hello" "I didn't find any records."
EndIf


dbfSetColumnWidths "[PubDir]PDSLoaner" "20|90|90|75|75|250"
dbfShowTable "[PubDir]PDSLoaner" "Rectangle1" ""

Re: Database question

PostPosted: Fri Jun 05, 2015 12:31 pm
by stevec
I have the basic query running.

I have two fields that are set to Boolean. I put an "X" in the "IN" field, but I can't get the second query to successfully query if there is nothing there and return the records if there is nothing there.

Ideas?

Thanks;
SteveC

Re: Database question

PostPosted: Mon Jun 08, 2015 10:22 am
by Neosoft Support
If it's a boolean field then you should be able to shear for true values like this:

dbfQuery "PDSLoaner.dbf" "PDSLoaner=true"

and false or null/empty values like this:

dbfQuery "PDSLoaner.dbf" "PDSLoaner<>true"

Re: Database question

PostPosted: Mon Jun 08, 2015 1:13 pm
by stevec
Killer, Thanks.