Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Call microsoft outlook when the field data is email address  (Read 13485 times)
Najmi N.
Posts: 14


« on: August 19, 2013, 11:46:01 am »

Hi

I'm using latest Genero BDL 2.41. I try to look for solution for form field TEXTEDIT type which stored the email address record ; by click at email address the Genero BDL will open the microsoft outlook and copy the email address into "To sender " column field in outlook.

Example :

   Email Address john.smith@gmail.com

I also look for solution when run the application on GWC via mobile. When the user click at phone number field which contain the person phone number, the GWC will directly make the call to that person. Was there any specific feature in Genero can do this?


Regards
Najmi

Reuben B.
Four Js
Posts: 1049


« Reply #1 on: August 20, 2013, 12:05:15 am »

One solution is to use a LABEL with the presentation style textFormat set to HTML.  Then it is a case of displaying to this the same HTML you would use in a webpage to trigger the launch of the mail tool, or a phone call.

In your form ...

Code
  1. LABEL f01 = formonly.email_address, STYLE="html";
  2. LABEL f02 = formonly.phone_number, STYLE="html";

In your stylesheet ...
Code
  1. <Style name="Label.html">
  2.   <StlyeAttribute name="textFormat" value="html" />
  3. </Style>

In your 4gl ...

Code
  1. DISPLAY '<a href="mailto:name@example.com">Mail Name</a>' TO email_address
  2. DISPLAY '<a href="tel:99999999">Phone Name</a>" TO phone_number


Hope that helps,

Reuben

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Najmi N.
Posts: 14


« Reply #2 on: August 20, 2013, 08:32:33 am »

Thanks Reuben

I have created as the attach files unfortunately I got an error when doing fglrun.

Program stopped at 'test.4gl', line number 6.
FORMS statement error number -8003.
Dom: A node is inserted somewhere it doesn't belong.
StlyeAttribute

Appreciate an advice

* test.4st (0.4 KB - downloaded 752 times.)
* test.per (0.51 KB - downloaded 740 times.)
* test.4st (0.4 KB - downloaded 734 times.)
Reuben B.
Four Js
Posts: 1049


« Reply #3 on: August 20, 2013, 09:13:55 am »

Its a typo on my part.  Should be StyleAttribute.

Also one of the DISPLAY lines, I haven't quite my quotes matching.

Browsers don't have syntax checkers :-)

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Najmi N.
Posts: 14


« Reply #4 on: August 20, 2013, 11:58:26 am »

Thanks Rueben

It's worked. I tested using GDC.

I saw the line statement inside Genero BDL 2.41 documentation that said that this approach only applicable for GDC.

Attach i shared statement.

Another approach to use Edit style attribute with dataTypeHint.

//






* ToRUeben.png (6.97 KB, 1323x155 - viewed 1481 times.)
Reuben B.
Four Js
Posts: 1049


« Reply #5 on: August 21, 2013, 12:14:12 am »

...

It's worked. I tested using GDC.

I saw the line statement inside Genero BDL 2.41 documentation that said that this approach only applicable for GDC.

Attach i shared statement.

...






I am surprised the documentation says that, I believe it is incorrect.  If you look inside the Label snippet (FGLASDIR/tpl/SetAjax/Label.xhtml, FGLASDIR/tpl/SetHtml5/Label.xhtml etc) you will see that it refers to the textFormat=html style attribute.

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines