Insert field caption to sms message and email

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
Aburajeh
User
Posts: 37

Insert field caption to sms message and email

Post by Aburajeh »

Hello,
How to set the Caption property of the field object?

I have StaffNo interger field (ID#) and caption is Name of him from staff records

in Row Updating event

$stname = $rsold['StaffNo'];

show only Original field value (ID#).

I want Display Field as view page, how to do it?

thanks


mobhar
User
Posts: 11726

Post by mobhar »

Your code in Row_Updating server event has nothing to do with the change of field Caption.

If you want to change the field Caption, then simply put this following code in Page_Load server event:

// let's say the field name is CategoryName
$this->CategoryName->Caption = "My Category Name";

Aburajeh
User
Posts: 37

Post by Aburajeh »

I want show view name as view page not value field id number

Staff field in database integer (ID Number ), show with form text name as dropdown select

I want “$name” text name from this form for inserting to sms message and email as notifications records full output text records


arbei
User
Posts: 9384

Post by arbei »


Aburajeh
User
Posts: 37

Post by Aburajeh »

IN ROW_UPDATING

SEND TO TELEGRAM CHANNEL

{
	$date0 = $rsnew['OrderDate'];
        $date1 = $rsnew['OrderDateBegin'];
        $date2 = $rsnew['OrderDateFinish'];
       $number = $rsold['Order_Number'];
       $stname = $rsold['StaffNo'];

$apiToken = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$data = [
'chat_id' => 'XXXXXXXXXXXXXXXX', 
'text' => 	"Edit Request# $number
ID# $stname 
date : $date0
From: $date1
To: $date2"
];

$response = file_get_contents("https://api.telegram.org/bot$apiToken/sendMessage?" . http_build_query($data) );    

    return true;
}

arbei
User
Posts: 9384

Post by arbei »

You better check if your URL is correct, e.g.

die(http_build_query($data));

Aburajeh
User
Posts: 37

Post by Aburajeh »

thank you for reply to me

I want Staff_no
Show as like form vlookup ###, Name


arbei
User
Posts: 9384

Post by arbei »

You need to make sure the format for 'text' and the resultant querystring is supported by your third party API yourself.


Post Reply