How to create an update page with an invisible July 03, 2020, 01:22:10 AM Hi, I'd like to change behavior on the list screen, see image belowThe edit button on that page must update only a single field on the database instead of open a new screen to allow the user to edit the values.The field called 'active' by default has a value of 1, it must update the field with a value 0.And after that, load the list again, the list doesn't show rows that have the 'active' field with a value of 0 (I do that using SQL).How can I create a action button and create a custom SQL to update the row value? Quote Selected
Re: How to create an update page with an invisible Reply #1 – July 04, 2020, 02:55:19 PM @claudiomg please there's currently no configuration for changing the behavior of the button. The only options you are left with is to manually edit the page, adding your custom button to the view page and creating a special function in the page's controller and pointing your button to it, just like the other buttons you see there, thanks. Quote Selected 2 Likes
Re: How to create an update page with an invisible Reply #2 – July 05, 2020, 02:02:39 PM I was able to create a new button without the need to change the view. I just copy the 'delete' button code and use its code on with a field, I was able to use the code in the 'CustomCode' propertyBut I need to create a special function in the page's controller.I just use one of the functions that are already created, then I copy and modify the code to fit my needs.Every time I made a change, the project is published, my special function controller is overwritten (erased it), but after that, I find out that is possible to uncheck the controller in the Publish option, this way the controller code is not overwritten anymore.Thanks for the explanation. Quote Selected Last Edit: July 05, 2020, 05:46:57 PM by claudiomg
Re: How to create an update page with an invisible Reply #3 – September 28, 2020, 01:10:02 PM Hi!@claudiomg would you be so kind to tell me where did you find the "custom code" part?I understand the code can be changed manually and it gets overwritten when doing a Publish... and i know you can exclude a file to be re-generated... but then the code will not be updated if you change something in the GUI editor is not that right?Is there any way of adding some INCLUDE/REQUIRE statement in the GUI so the file can be regenerated and you can keep your code?Regards Quote Selected
Re: How to create an update page with an invisible Reply #4 – October 01, 2020, 08:14:15 PM "@claudiomg would you be so kind to tell me where did you find the "custom code" part?"Check the image below"I understand the code can be changed manually and it gets overwritten when doing a Publish... and i know you can exclude a file to be re-generated... but then the code will not be updated if you change something in the GUI editor is not that right?"Yes, you are right. If you uncheck a file, this file will not be re-generated. If you need to update the GUI in the editor, you will need to change the file manually.Because of that, I suggest that you use the custom code field. This way, you don't need to uncheck the file. The file will be always regenerated and your modifications in the custom code field will be preserved."Is there any way of adding some INCLUDE/REQUIRE statement in the GUI so the file can be regenerated and you can keep your code?"I don't know if it is possible to do that. Quote Selected
Re: How to create an update page with an invisible Reply #5 – October 02, 2020, 05:50:22 AM @claudiomg Thanks for the info! I know/see this "custom code"... but that is for a displaying/acting on a field only.But yes... it solves quite a lot of situations. Regards Quote Selected