Page 1 of 1

Link to add new register

Posted: 2018-10-30 12:02
by balfons
Hello,

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

Thanks

Re: Link to add new register

Posted: 2018-10-30 15:51
by balfons
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!!

Re: Link to add new register

Posted: 2018-11-07 11:36
by balfons
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

Re: Link to add new register

Posted: 2018-11-13 16:26
by a.gneady
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.

Re: Link to add new register

Posted: 2018-11-15 09:24
by balfons
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!!