Skip to main content
Topic: Page Modal component (Read 2277 times) previous topic - next topic

Page Modal component

Modal component properties

Re: Page Modal component

Reply #1
Now the Google Maps link  :

1)******
Created 2 Tables both with identical columns
Table "CustCur"
Table "CustHist"
|*******

2)******
CustCur - "Add New page" only NO View,Edit,Delete

CustHist - View, Edit and Delete only No "Add Page"
-CustHist has couple extra fields for "file upload" "Notes" and "photo uploads" .

Works as so.
Add new page in "CustCur" in "Page Properties" Action After Add
PHP Statement to Execute insert data to CustHist " $rec_id = $db->insert( 'custhist' , $modeldata); "
|********

- Purpose was page "CustCur" to quickly get Customer demographics, then on site visit "CusHist" get Photos Files..etc
CustCur to do most of the work.

3)******
Now how to get to customer site ? ah need map. OK

Create Field URL or a Button URL "Get Map"

Both CustCur and CustHist must have these columns,
Address-City-Stat-Zipcode and column "MapUrl"

4)******
In View Page, add @ " Action Before View Page" under View Page Properties.

$db->rawQuery("UPDATE quotehist SET MapUrl = CONCAT('https://www.google.com/maps/search/?api=1&query=',`Address`,',',`City`,',',`Stat`,',',`Zipcode`)");

****
Result in field is now a browser link combined from your Address-City-Stat-Zipcode added into column "MapUrl"
 "https://www.google.com/maps/search/?api=1&query=1234 Test St,Tester City,,53172"






--------------

*Note: If needed on "CustCur" page to have "Edit Page" and update table "CustHist"
do-
in "Page Properties" Action After Update
PHP Statement to Execute insert data to CustHist.
add these 2 lines below.
$db->where('id' , $rec_id);
$db->update( 'CustHist' , $modeldata );

--------------


and..back up PPM file, database and zip up htdocs\myapp.