Questions and discussion about using ProcessMaker: user interface, running cases & functionality
By hhalim
#829783
Hello,

is there any chance to fill grid from database in dynaform , the trigger needs to be fired before the dynaform ?

I want to fill grid based on radio button while user is changing option in radio button
User avatar
By kirkwg
#829784
https://wiki.processmaker.com/3.1/Grid_Control#Populating_Grids_with_a_Database_Query
This online menu could help you for populating grids with a trigger to query a DB, put query results into a grid.

1/ Not in a real time event: //easy solution
Yes, trigger is designed to run either before loading a dynaform or after submitting a dynaform.
Logic:
-- Before a dynaform, run your trigger to get query from DB save up to the grid table
--Based on your checkbox or radio option, hide/show the a particular grid rows (since you already have data on hands)


2/if you want a real time to an event when a button or a checkbox checked, your event sequence could be:
When a checkbox checked (setOnchange()) > simulate a form submit action > run a trigger (after dynaform) >

Logice of your trigger: //advance solution
- do a query based on your value of checkbox or dropdown whatever
- query results directly assigned to a grid (same fields vs. grid's column fields)
- last php statement to jump back to presvious step i.e. returning to your presvious task but the form/grid get filled

A 1xbet clone script is a pre-designed software so[…]

4rabet clone script is enabling entrepreneurs to e[…]

Parimatch clone script is enabling entrepreneurs t[…]

In the world of cryptocurrency, a wallet is an app[…]