How to modified advanced search

Questions and discussion about using ProcessMaker 2: user interface, running cases and functionality

Moderator: amosbatto

Forum rules
Please search to see if a question has already been asked before posting. Please don't ask the same question in multiple forums.
minhvoice
Posts: 1
Joined: Wed Apr 04, 2018 2:01 pm
Country: United States of America

How to modified advanced search

Unread postby minhvoice » Wed Apr 04, 2018 2:04 pm

hi

i created a new menu according to my process and want to modified advanced search according to my fields

i want to apply filter on my custom fields as i build a new dynaform for advanced search with my custom fields and wanted to fetch data from db


how i fetch data from db and which files to be modified according to my filter


thanks in advance

amosbatto
Posts: 6143
Joined: Mon Jun 22, 2009 10:28 am
Country: Bolivia
Location: La Paz
Contact:

Re: How to modified advanced search

Unread postby amosbatto » Wed Apr 04, 2018 3:32 pm

If you want to modify advanced search, you can modify the code of the Applications::getAll() function defined in workflow/engine/classes/class.applications.php.

Look in the code where $search is used.

To do a query in the database, you can use this code:

Code: Select all

$g = new G()
$g->LoadClass('pmFunctions');

//set to the ID of your database connection if using an external database
$db '1234567890abcdef1234567890abcdef';
 
$aRows executeQuery("SELECT FIELD1, FIELD2 FROM TABLEX"$db);
if (
count($aRows) >= 1) {
   
$x $aRows[1]['FIELD1'];
Amos B. Batto ♦ ProcessMaker Technical Documentation Writer & Forum Manager ♦ Cofounder of ILLA (http://www.illa-a.org)


Return to “Using ProcessMaker 2”

Who is online

Users browsing this forum: No registered users and 10 guests