Skip to main content
Topic: Button to run a query (Read 1957 times) previous topic - next topic

Button to run a query

Hi,
how can i use this button to run a query?

i need clone all data from this id to other table many times i need.. 



Re: Button to run a query

Reply #2
yes

Re: Button to run a query

Reply #3
@lp_felix‍ find attachment below for refference.

1. Select the page you want that button to redirect the user to.
2. Select the data you want to pass to the page being redirected to. e.g $data['id'], USER_ID, etc.

Re: Button to run a query

Reply #4
If you need to insert a new record based on the values of the current page, You can add Subpage and Bind Values of the subpage to the new Add Page.
I shared a video on how you can achieve this.

Clone View Page to a new page

Re: Button to run a query

Reply #5
Excellent,  thank you
You should make more videos like that,  it's more easy to understand.

Thanks for your help

Re: Button to run a query

Reply #6
I've tried to make this work in Product page (example) to create a new Product and works fine. But if I try to use it in Product page to create (for instance) a new order based on that product (ie filling the product details in order page) it's not working. Returns Undefined index: notices in some of the bound fields. But others work fine. And all those fields are basically the same type INT(11)

Re: Button to run a query

Reply #7
@lp_felix‍ find attachment below for refference.

1. Select the page you want that button to redirect the user to.
2. Select the data you want to pass to the page being redirected to. e.g $data['id'], USER_ID, etc.
@willvin Has Record_ID been removed as a possible setting?


Re: Button to run a query

Reply #9
@willvin  In your screenshot the second component property. It’s not on my PHPrad.

Re: Button to run a query

Reply #10
@Erwin‍ No, it has not been removed. Depending on the page you place the button you get a set of available configurations for it. if you want the RecordID configuration, please place the button on a view page, thanks.

Re: Button to run a query

Reply #11
@willvin Ahaa, yes found it! I placed it on a View page, but only when it LINKS to a view page, then it shows :thumbs_up: