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
#826596
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 :
ORDER_DATA_ITEM
pm tables.png
pm tables.png (25.33 KiB) Viewed 313 times
ORDER_DATA
Order data.png
Order data.png (25.23 KiB) Viewed 313 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'];
}else{	
$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
grids.png (49.83 KiB) Viewed 313 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'];
}
Greetings.
User avatar
By amosbatto
#826611
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
   FROM PMT_ORDER_DATA_ITEM 
   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.
Change template of reset password

Is possible to change the template is send by ma[…]

Display PDF OR Xlsx OR Xls in Panel

Hi, It is not working. can you please share pmx f[…]

open case through dashboard

Thank you

I have done using session id. I have used version […]