Restrict selection when a column reaches required number

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
dallo
Posts: 8
Joined: 2014-05-19 14:43

Restrict selection when a column reaches required number

Post by dallo » 2014-08-13 15:28

Hello all,

I would be most appreciative if i could get some help.

i have a table "lecture", as below;
Lecture
id | Name | student number | lecture | session

the session field is a drop down containing available session for a lecture.
Students can log on to the application and view only their records, and then select a session for the selected lecture.

I would like to limit selection of a session to 5, after which you would be prompted to pick another session.

I need assistance ASAP.

Kind regards,
Dallo

udayvatturi
AppGini Super Hero
AppGini Super Hero
Posts: 85
Joined: 2014-06-14 03:08
Location: India
Contact:

Re: Restrict selection when a column reaches required number

Post by udayvatturi » 2014-08-14 03:58

I think you can customize hook files accordingly.

Get the number of sessions started using sqlValue() and based on the value you can return true or false.

If you want custom error message, you need to use PHP Sessions and make changes in incCommon.php

Check your PM.

rob parsons
Posts: 8
Joined: 2014-10-31 20:11

Re: Restrict selection when a column reaches required number

Post by rob parsons » 2014-11-26 20:56

Can you give me how to set up custome error messages please and what i need to change in inccommon.php. have a need to output a custom error on false for a hook im writing and this seems the way to do it, if i had the detail. thank you:)

Post Reply