Widget to create a vcard from the data of an entity.

Hi, thanks in advance.


I have developed a basic web and traditional application as a CRUD with OU 11.


It is an scafolding from an entity, with user data such as name, surname, job title ... in addition to having mailto and tel to the table data.


I need to know if there is something done to be able to generate a vcard from that data, so that it can be downloaded and imported into a smartphone.


Thanks greetings.

As per my knowledge there is no widget right now to generate vcard but you can do it yourself and it is very simle.

Just generate your vcard content string, you can see the format here in case you don't know.

Then use download widget in your action to download this file. You have to set the content type of the download to text/vcard and set file name and content.

Nikhil Gaur wrote:

As per my knowledge there is no widget right now to generate vcard but you can do it yourself and it is very simle.

Just generate your vcard content string, you can see the format here in case you don't know.

Then use download widget in your action to download this file. You have to set the content type of the download to text/vcard and set file name and content.


 Thank you very much, I have understood.

 I have a new question. How can I create the new string? That is to say, do I have to do it in some concrete element or in the same widget download?

 In the FileName I have put this to contain the field "first name" and "last name".
 SyntaxEditor Code Snippet

 "Contacto_" + GetContactoes.List.Current.Contacto.Nombre + "_" +GetContactoes.List.Current.Contacto.Apellidos

 En MimeType, as you told me:

 SyntaxEditor Code Snippet,

 "text/vcard"

 And in the content of the file I put this:

 SyntaxEditor Code Snippet

 "COMIENCE: VCARD" + "VERSIÓN: 3.0" + "NOMBRE:" + GetContactoes.List.Current.Contacto.Nombre + "APELLIDOS" + GetContactoes.List.Current.Contacto.Apellidos + "ORGANIZACION:" + GetContactoes.List.Current.Contacto.Puesto + GetContactoes.List.Current.Contacto.Area + GetContactoes.List.Current.Contacto.Division + "TELEFONO; TIPO = TRABAJO, VOZ:" + GetContactoes.List.Current.Contacto.Telefono + "TELEFONO; TYPE = HOME, VOICE:" + GetContactoes.List.Current.Contacto.Extension + "MAIL:" + GetContactoes.List.Current.Contacto.Mail + "REV:" + CurrDateTime()+ "FIN: VCARD"

 How many things am i doing wrong?


 And how do I connect the widget?


 Thank you so much.


Did you try look to this old component, and try understood the way that it works: https://www.outsystems.com/forge/component-overview/85/vcard-generator

Nuno Miguel Verdasca wrote:

Did you try look to this old component, and try understood the way that it works: https://www.outsystems.com/forge/component-overview/85/vcard-generator



it no longer works, but I wanna do it with out complements.



Tnahks.

Hi Miguel,

The Download goes in place of the End. You can either connect it manually, or drag it on top of the End.

Solution

Your flow will be something like this.

  • Assign your vcard string to a local or input variable.
  • Convert it to binary data using TextToBinaryData action (You have to add its depedency from BinaryData)
  • Use download in place of your end node and assign converted binary data to its file content property and also set file name

I hope this will help.

Solution

I would also suggest you to go to Learning Portal and complete your basic study first in OutSystems, after that you will not get stuck in such situations.

Nikhil Gaur wrote:

I would also suggest you to go to Learning Portal and complete your basic study first in OutSystems, after that you will not get stuck in such situations.

Thanks I'll do it. 


Greetings, and many thanks for your time.