Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderator: amosbatto

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By Thommelise
I have been struggling with this problem for a while now, and really neeed help. :? :?:

I have these grids that i have to populate with a trigger.
This is a change process, so i allready have saved the record, just need to pull it up again, using a DNS name from PMT_ORDER_DATA as reference.

I use 2 pm tables :
pm tables.png
pm tables.png (25.33 KiB) Viewed 245 times
Order data.png
Order data.png (25.23 KiB) Viewed 245 times
The information i want to fill into the grid comes from ORDER_DATA_ITEM and i have to get it using a DNS name i get from ORDER_DATA

This is one of the version of the trigger code i have been trying, just to get any information into the grids.
Code: Select all
$linuxDiskManualTag = @@linuxDiskManualTag;
$result = executeQuery("select D1 AS $linuxDiskManualTag from PMT_ORDER_DATA_ITEM where OrderItemID = '190806_135951_27395034' and type =4");
putlog( 'SQL8='.$result );
if (is_array($result ) and count($result ) > 0) {
   @@linuxDiskManualTagId = $result[1]['D1'];
$g = new G();
$g->SendMessageText("Could not select record in PMT_ORDER_DATA_ITEM PM table.", "ERROR"); 

The grid im trying to fill.
grids.png (49.83 KiB) Viewed 245 times
The code im using to fill the text fields, its the DNS_name _Wanted i have to use in PMT_Order_Data :
Code: Select all
$exitsting_DNS = @@exitsting_DNS;
$result = executeQuery("SELECT * FROM PMT_ORDER_DATA WHERE DNS_name_Wanted='$exitsting_DNS'");
if (is_array($result ) and count($result ) > 0) {
   @@Sysowner_contact_name = $result [1]['SYSOWNER_CONTACT_NAME'];  
   @@Sysowner_department = $result [1]['SYSOWNER_DEPARTMENT'];
   @@Sysowner_contact_phone = $result [1]['SYSOWNER_CONTACT_PHONE'];	
   @@Sysowner_manager= $result [1]['SYSOWNER_MANAGER']; 
   @@Sysowner_contact_email= $result [1]['SYSOWNER_CONTACT_EMAIL'];
   @@Sysowner_mgr_phone= $result [1]['SYSOWNER_MGR_PHONE'];
User avatar
By amosbatto
Is your question how to populate a grid with a database query or is your question how to relate the two tables in your database query?

If the former question, then your trigger would be:
Code: Select all
$id = @@someVariable;
$sql = "SELECT D1 AS diskTag, D2 AS lgVg, D3 AS diskSize, D4 AS description
   WHERE ID = $id";
@=linuxDiskPartitioningGrid = executeQuery($sql);
Where @=linuxDiskPartitioningGrid is the variable associated with the grid and diskTag, lgVg, diskSize and description are the IDs of the fields inside the grid.

Hi, Is there any way to show my custom column only[…]

Send for clarification

Hi, I know this is an old post but i could not fin[…]

add dropdown to search process

Please replay if there is any solution!!!!

Amosbatto, is down.

Hi Amos, I appreciate you setting up a tips and t[…]