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
Posts: 10
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
Posts: 10
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
Posts: 10
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: 962
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: Learn all the tips and tricks of customizing AppGini apps through our online course.

:arrow: Summary Reports plugin enables you to build powerful reports and charts inside your AppGini application through a few simple steps. See the big picture and discover trends in your data that empower you to take the right decisions confidently.

:arrow: Search Page Maker enables you to build user-friendly yet powerful search pages for your AppGini application by simply dragging and dropping the fields you want to include in search.

balfons
Posts: 10
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