Hello, I would like to know how to go from an interface to a form through a button.
I have this interface, that button 'Alta proceso' should show a form to register a new process into my database.
{ a!buttonArrayLayout( buttons: { a!buttonWidget( label: "Alta Proceso", style: "NORMAL" ) }, align: "START" ), a!gridField( data: a!queryEntity( entity: cons!LV_Procesos_Constant, query: a!query( selection: a!querySelection( columns: { a!queryColumn( field: "codigoproceso" ), a!queryColumn( field: "nombreproceso" ), a!queryColumn( field: "version" ), a!queryColumn( field: "tecnologia" ), a!queryColumn( field: "desarrollador" ), a!queryColumn( field: "levantador" ) } ), pagingInfo: fv!pagingInfo ), fetchTotalCount: true ), columns: { a!gridColumn( label: "Codigoproceso", sortField: "codigoproceso", value: fv!row.codigoproceso ), a!gridColumn( label: "Nombreproceso", sortField: "nombreproceso", value: fv!row.nombreproceso ), a!gridColumn( label: "Version", sortField: "version", value: fv!row.version ), a!gridColumn( label: "Tecnologia", sortField: "tecnologia", value: fv!row.tecnologia ), a!gridColumn( label: "Desarrollador", sortField: "desarrollador", value: fv!row.desarrollador ), a!gridColumn( label: "Levantador", sortField: "levantador", value: fv!row.levantador ) }, pageSize: 20, initialSorts: {} ) }
this is the form
a!formLayout( label: "Form", contents: { a!sectionLayout( contents: {} ), a!sectionLayout( label: "Section", contents: { a!textField( label: "Código proceso", labelPosition: "ABOVE", saveInto: ri!lvprocesos.codigoproceso, refreshAfter: "UNFOCUS", validations: {} ), a!textField( label: "Nombre proceso", labelPosition: "ABOVE", saveInto: ri!lvprocesos.nombreproceso, refreshAfter: "UNFOCUS", validations: {} ), a!textField( label: "Versión (Solo números decimales Ej: 2.0)", labelPosition: "ABOVE", saveInto: ri!lvprocesos.version, refreshAfter: "UNFOCUS", validations: {} ), a!textField( label: "Tecnología", labelPosition: "ABOVE", saveInto: ri!lvprocesos.tecnologia, refreshAfter: "UNFOCUS", validations: {} ), a!textField( label: "Desarrollador", labelPosition: "ABOVE", saveInto: ri!lvprocesos.desarrollador, refreshAfter: "UNFOCUS", validations: {} ), a!textField( label: "Levantador", labelPosition: "ABOVE", saveInto: ri!lvprocesos.levantador, refreshAfter: "UNFOCUS", placeholder: "levantador", validations: {} ) } ) }, buttons: a!buttonLayout( primaryButtons: { a!buttonWidget( label: "Submit", saveInto: a!writeToDataStoreEntity( dataStoreEntity: cons!LV_Procesos_Constant, valueToStore: ri!lvprocesos), submit: true, style: "PRIMARY" ) }, secondaryButtons: { a!buttonWidget( label: "Cancel", value: true, saveInto: ri!cancel, submit: true, style: "NORMAL", validate: false ) } ) )
When I click 'Submit' that process insert into my database and then the first updated interface should be displayed again.
Excuse my lack of knowledge, I'm still learningI await your response, thank you very much
Discussion posts and replies are publicly visible
1. Create a process model that will have your first interface and second form. After submitting, redirect it to the same process model
Note: using looping back to the same form this scenario can be achieved but looping causes ill-process management strategy. So I don`t recommend
2. Create a record related to your database table and create an action that will have your second UI.
Create Record --> Create Action --> Map this action to the record.
I hope both of these solutions will help you :)
Thank you very much for answering, I will try