no repeating value if date is same (one enter per day)

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
zkarwinkar
Veteran Member
Posts: 32
Joined: 2021-06-12 21:01

no repeating value if date is same (one enter per day)

Post by zkarwinkar » 2022-06-30 10:36

hi there ,

i want to make table where user can add one entry per day .

for example : table name : daily_submissions

1)category (drop down)
2)file
3)date (auto)

i want the user can submit daily one file for each category .

how to make it possible ?

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: no repeating value if date is same (one enter per day)

Post by pbottcher » 2022-06-30 17:48

Hi,

you can check in the _before_insert hook if a record from that user for the give category already exists and return false if this is the case.
This will not create a new record.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

zkarwinkar
Veteran Member
Posts: 32
Joined: 2021-06-12 21:01

Re: no repeating value if date is same (one enter per day)

Post by zkarwinkar » 2022-07-01 07:38

i am weak in programming, can you give me some code ?

Post Reply