Source language: Translate to:

Nothing Happens

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Nothing Happens

Postby HackinHoodLogicsTm » Tue May 02, 2017 10:06 am

I have my table name MyTable
And Field as follows

User | Age | Height

I added the following to the Age field (20,28,30,35)

Then i did this at subrountine
Syntax: [ Download ] [ Hide ]
Using Neobook Syntax Highlighting
If "[Mydb.MyTable.Age]" ">" ""
SystemSound "SystemAsterisks"
MessageBox "Are you sure you want to continue with [Mydb.MyTable.Age]" "Yes|No" "[UserSel]"
....
EndIf
 
Parsed in 0.006 seconds, using GeSHi 1.0.8.10


Then i assigned the subrountine to the Table this
Syntax: [ Download ] [ Hide ]
Using Neobook Syntax Highlighting
dbpOpenTable "DB" "MyTable" "FieldOnChange"
Parsed in 0.005 seconds, using GeSHi 1.0.8.10


Where FieldOnChange contains the subrountine code.

But in the Grid display if i select any of the ages nothing happens.

Please am i missing something here.
I am proud to be a Neobooker!!!
www.neosoftware.com
Special Thanks To
Mr. David Riley
User avatar
HackinHoodLogicsTm
 
Posts: 120
Joined: Wed Aug 28, 2013 7:03 am
Location: Ghana

Re: Nothing Happens

Postby Gaev » Tue May 02, 2017 10:24 am

HackinHoodLogicsTm:

From the Help file ...
The name of a subroutine from your publication's Subroutine Action. The subroutine specified here will be automatically executed whenever the table is updated or the current record number changes. This can be useful if you want to activity to take place whenever the reader displays a different record. Subroutines are entered from the Actions page of NeoBook's Book Properties screen. NeoBook's help file contains more information on using subroutines.

So, the question is "when is the Table considered updated" ? ... my guess is "when you/user explicitly Save the current record ... or move to another record"

See what happens when ...

1) the subroutine has something simple like ...
Code: Select all
AlertBox "Mydb.MyTable.Age" "[Mydb.MyTable.Age]"

... so you can learn when the subroutine is invoked (irrespective of what field or value is changed)

2) you make a change to another (simple text or number) field

3) navigate to another record AFTER making the change.

This set of steps will give you an idea about how things are supposed to work.

If you are confused still, post your findings here (along with definitions of your fields).
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Nothing Happens

Postby HackinHoodLogicsTm » Tue May 02, 2017 12:18 pm

Thanks Gaev for the reply.

So, the question is "when is the Table considered updated" ? ... my guess is "when you/user explicitly Save the current record ... or move to another record"


The table is considered Updated if the value in the field is changed without having to move into the next record.

The Alert Function should work as soon as the user make changes in the Table Field.
I am proud to be a Neobooker!!!
www.neosoftware.com
Special Thanks To
Mr. David Riley
User avatar
HackinHoodLogicsTm
 
Posts: 120
Joined: Wed Aug 28, 2013 7:03 am
Location: Ghana

Re: Nothing Happens

Postby Gaev » Tue May 02, 2017 3:08 pm

HackerhoodLogicsTm:

The table is considered Updated if the value in the field is changed without having to move into the next record.
The Alert Function should work as soon as the user make changes in the Table Field.

Did you try with the simple AlertBox command as your subroutine ? ... if so, what was the result ...

a) when you changed the value in another field ?

2) when you picked another value from the dropdown for the Age field ?

3) after you navigated to another record ?
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Nothing Happens

Postby HackinHoodLogicsTm » Wed May 03, 2017 1:59 am

Gaev wrote:HackerhoodLogicsTm:

The table is considered Updated if the value in the field is changed without having to move into the next record.
The Alert Function should work as soon as the user make changes in the Table Field.

Did you try with the simple AlertBox command as your subroutine ? ... if so, what was the result ...

a) when you changed the value in another field ?
Nothing happens. I dont see the system sound and the alertbox

2) when you picked another value from the dropdown for the Age field ?
Nothing happens eithter. I dont see the system sound and the alertbox

3) after you navigated to another record ?

Nothing happens here too am starting to wonder if the dbpPro subrountine actually works
I am proud to be a Neobooker!!!
www.neosoftware.com
Special Thanks To
Mr. David Riley
User avatar
HackinHoodLogicsTm
 
Posts: 120
Joined: Wed Aug 28, 2013 7:03 am
Location: Ghana

Re: Nothing Happens

Postby Gaev » Wed May 03, 2017 5:07 am

HackinHoodLogicsTm:

I made a copy of the AddressBook pub sample that comes with NeoBookDBPro ... and added a line to the subroutine ...
Code: Select all
:DataBaseUpdate
AlertBox "AddrBook.Contacts.$RecCount" "[AddrBook.Contacts.$RecCount]"
TrackBarSetMax "TrackBar1" "[AddrBook.Contacts.$RecCount]"
SetVar "[TrackBar1]" "[AddrBook.Contacts.$RecNum]"
Return


When I ran this modified pub, the AlertBox ...

1) popped up at the start ... then I did a View >>> Grid View

2) did NOT pop up when I made changes to the Company field (even when I navigated to another field in the same record)

3) popped up when I navigated to another record

This confirms what I said in an earlier post i.e. the Table is considered updated when "when you/user explicitly Save the current record ... or move to another record".

If you are not seeing the AlertBox even after you navigate to another record, it could be because of some typo error ... make sure that your dbpOpenTable command has ...

1) the correct DatabaseID and Table Name specified

2) the specified Subroutine matching exactly with the subroutine label in the Subroutines section (except for the leading colon character)

You can also watch the Debugger to see if this subroutine is invoked/serviced when you navigate to a new record in the Grid.
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Nothing Happens

Postby HackinHoodLogicsTm » Wed May 03, 2017 10:24 am

Thanks Gaev for the clarification.

I did not wanted it to action to take place upon moving to the next record. I wanted this to happen as you update the field.

I think it's time we can an update on DBPro.
I am proud to be a Neobooker!!!
www.neosoftware.com
Special Thanks To
Mr. David Riley
User avatar
HackinHoodLogicsTm
 
Posts: 120
Joined: Wed Aug 28, 2013 7:03 am
Location: Ghana

Re: Nothing Happens

Postby Neosoft Support » Sat May 06, 2017 7:52 pm

You can use the dbpSaveEdits action to save changes without navigating to another record.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 2 guests