Link to add new register

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
balfons
Veteran Member
Posts: 91
Joined: 2018-10-22 15:27

Link to add new register

Post by balfons » 2018-10-30 12:02

Hello,

I'm trying to make a direct link to a new record creation in a specific table. How can I implement it?

Thanks

balfons
Veteran Member
Posts: 91
Joined: 2018-10-22 15:27

Re: Link to add new register

Post by balfons » 2018-10-30 15:51

Hi to all,

I've made this:
1. check Allow adding new records from homepage in Appgini client.
2. Publish new versión
3. Copy link in the "+" button

THe link is this: http://localhost/name_project/nametable ... addNew_x=1

I think that I could now implement the direct link to creation of records... thanks in any case!!

balfons
Veteran Member
Posts: 91
Joined: 2018-10-22 15:27

Re: Link to add new register

Post by balfons » 2018-11-07 11:36

Ok. I'm still working on it.
Is there any way to call the creation of a new record and fullfilling automatically some of the fields?

My use case is:

Parent table: Company. Field: Name
Children table: Employee. Field. Company name

I want to add a button in the detail view of my parent table for creating a new record in the children table. I know how to add the button (thanks to Udemy course purchased with Appgini) but I don't know how to make the call to the creation adding this.

Any help?

Thanks

User avatar
a.gneady
Site Admin
Posts: 1281
Joined: 2012-09-27 14:46
Contact:

Re: Link to add new register

Post by a.gneady » 2018-11-13 16:26

You can pre-populate a field in the new record if it's a lookup field by adding this parameter to the URL:

Code: Select all

filterer_fieldname=id
.. replace fieldname with the actual name of the lookup field, and id with the primary key value of the parent record.
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

balfons
Veteran Member
Posts: 91
Joined: 2018-10-22 15:27

Re: Link to add new register

Post by balfons » 2018-11-15 09:24

mmmm, I'll try... I think that I must follow the wollowing steps:

1. Add the new button
2. Programmatically do this:
2.1 Catch the current record_id for the detail I'm analizing.
2.2. Concatenate:
a) the url for add a register
b) the name of the parameter
c) the id of the record in the current view (catched in 2.1)

Can you confirm I'm on the right way?

Thanks!!

Post Reply