web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / QR Code Business Cards
Power Apps
Answered

QR Code Business Cards

(0) ShareShare
ReportReport
Posted on by 519

Hello,

 

I've used the below code which was a component uploaded to PowerApps for creating QR codes for business cards and it works quite well.

 

"BEGIN:VCARD
VERSION:4.0
PRODID:-//experience.digital//EN
N:" & Office365Users.MyProfile().Surname & ";" & Office365Users.MyProfile().DisplayName & "
FN:"& Office365Users.MyProfile().DisplayName & Char(10) &
"EMAIL:"&Office365Users.MyProfile().Mail&Char(10)&
"ORG:"& Office365Users.MyProfile().CompanyName &Char(10)&
"TEL:"& Office365Users.MyProfile().mobilePhone &Char(10)&
"POS:"& Office365Users.MyProfile().JobTitle &Char(10)&
"ADR:;" & Office365Users.MyProfileV2().streetAddress & ";" & Office365Users.MyProfileV2().city & ";" & Office365Users.MyProfileV2().state & ";" &Office365Users.MyProfileV2().country & ";" & Office365Users.MyProfileV2().postalCode & Char(10) &
"URL:" & "https://www.google.com" & Char(10) &
"END:VCARD"

 

The Job title of the person was not showing up when the QR code was being scanned so I added the bolded line of code above.  It still does not show up when scanned so I am not sure what to do.  Also, I notice my surname is repeated twice when the QR code is scanned.  I tried modifying the code there and only came up with errors.  Any guidance on how to rectify these two issues appreciated.  Thanking you in advance.  

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,454 Most Valuable Professional on at

    Hi @joshieboy ,

    I can only look at syntax here as I am not familiar with, nor can test anything. The N (Name) part may be as below, but the JobTitle definitely should be there if the other information is present and it exists in your AD record of the person involved.

    "BEGIN:VCARD
    VERSION:4.0
    PRODID:-//experience.digital//EN
    N:" & Office365Users.MyProfile().GivenName & ";" & Office365Users.MyProfile().Surname & Char(10) & 
    "FN:" & Office365Users.MyProfile().DisplayName & Char(10) &
    "EMAIL:"& Office365Users.MyProfile().Mail & Char(10) &
    "ORG:" & Office365Users.MyProfile().CompanyName & Char(10) &
    "TEL:" & Office365Users.MyProfile().mobilePhone & Char(10) &
    "POS:" & Office365Users.MyProfile().JobTitle & Char(10) &
    "ADR:" & Office365Users.MyProfileV2().streetAddress & ";" & Office365Users.MyProfileV2().city & ";" & Office365Users.MyProfileV2().state & ";" &Office365Users.MyProfileV2().country & ";" & Office365Users.MyProfileV2().postalCode & Char(10) &
    "URL:" & "https://www.google.com" & Char(10) &
    "END:VCARD"

    You might also try this

    With(
     {wUser: Office365Users.MyProfileV2()},
     "BEGIN:VCARD
     VERSION:4.0
     PRODID:-//experience.digital//EN
     N:" & wUser.givenName & ";" & wUser.surname & Char(10) & 
     "FN:" & wUser.displayName & Char(10) & 
     "EMAIL:" & wUser.mail & Char(10) & 
     "ORG:" & wUser.companyName & Char(10) & 
     "TEL:" & wUser.mobilePhone & Char(10) & 
     "POS:" & wUser.jobTitle & Char(10) & 
     "ADR:" & wUser.streetAddress & ";" & wUser.city & ";" & wUser.state & ";" & wUser.country & ";" & wUser.postalCode & Char(10) & 
     "URL:" & "https://www.google.com" & Char(10) & 
     "END:VCARD"
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • joshieboy Profile Picture
    519 on at

    Hello @WarrenBelz  - thanks for your feedback.  This was the component used:  https://github.com/Experience-Digital-MS/eBusinessCard/blob/main/LICENSE

     

    In your modified code its now trying to add the name of the company to my contacts and not my display name from AD.

  • joshieboy Profile Picture
    519 on at

    The first code is closer, it shows my name though in reverse - surname, firstname but it removes the duplicate surname.  The Job Title though is still the missing piece

  • WarrenBelz Profile Picture
    156,454 Most Valuable Professional on at

    @joshieboy ,

    As I mentioned, I am not familiar with the component - I just concentrated on syntax. I do not know what components you actually need - so what do you actually want in N and FN (I now suspect Name and First Name) ? All components rely on the data being available in Active Directory, so if your AD administrator has not in included Job Title in that field, it will not be available to you. Using this code in my AD

    "BEGIN:VCARD
    VERSION:4.0
    PRODID:-//experience.digital//EN
    N:" & Office365Users.MyProfile().DisplayName & Char(10) & 
    "FN:" & Office365Users.MyProfile().GivenName & Char(10) &
    "EMAIL:"& Office365Users.MyProfile().Mail & Char(10) &
    "ORG:" & Office365Users.MyProfile().CompanyName & Char(10) &
    "TEL:" & Office365Users.MyProfile().mobilePhone & Char(10) &
    "POS:" & Office365Users.MyProfile().JobTitle & Char(10) &
    "ADR:" & Office365Users.MyProfileV2().streetAddress & ";" & Office365Users.MyProfileV2().city & ";" & Office365Users.MyProfileV2().state & ";" &Office365Users.MyProfileV2().country & ";" & Office365Users.MyProfileV2().postalCode & Char(10) &
    "URL:" & "https://www.google.com" & Char(10) &
    "END:VCARD"

    I received this

    WarrenBelz_2-1672519515574.png

    so there is nothing wrong with the code.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

     

     

     

  • joshieboy Profile Picture
    519 on at

    Hi @WarrenBelz  - I also receive the above like you and Position has data in my AD so I see Business Analyst II there.  No sure why it is the only thing that is not coming up when the QR Code is scanned.  Not sure what else I can check here.

  • WarrenBelz Profile Picture
    156,454 Most Valuable Professional on at

    @joshieboy ,

    I am not sure how to help further - I need to know what AD values are expected in the template if these are not the ones you need.

  • Verified answer
    joshieboy Profile Picture
    519 on at

    Hello @WarrenBelz - apparently VCard uses special fieldnames, so while I came up with POS as the fieldname for position, it should have been called Title.  Once I made that change, it showed up the job title in the scan.  Works like a charm now.  Thanks for all your time and assistance with troubleshooting this.  Greatly appreciated.

     

    Regards,

  • Layan Profile Picture
    4 on at

    Hello @joshieboy ,

     

    kindly would you please share your full solution with licenses and details to help resolve this issue for all concerned- as im still struggling with it. 

     

    kind regards

  • Jeremiah-GTH Profile Picture
    15 on at

    This is what I came up with for the QRL code inside power apps using the Demo App on GitHub called EDMS e-Business card.

     

    "https://quickchart.io/qr?text=" & "BEGIN:VCARD
    VERSION:4.0
    PRODID:-//experience.digital//EN" &
    "N:" & Office365Users.MyProfile().GivenName & Char(10) & 
    "LN:" & Office365Users.MyProfile().Surname & Char(10) & 
    "FN:" & Office365Users.MyProfile().DisplayName & Char(10) &
    "EMAIL:"& Office365Users.MyProfile().Mail & Char(10) &
    "ORG:" & Office365Users.MyProfileV2().companyName & Char(10) &
    "TITLE" & Office365Users.MyProfileV2().department & Char(10) &
    "ROLE" & Office365Users.MyProfileV2().jobTitle & Char(10) &
    "TEL;VALUE=uri;PREF=1;TYPE=voice:" & "(931)771-2682" & Char(10) &
    "TEL;VALUE=uri;TYPE=text,voice,cell:" & Office365Users.MyProfileV2().mobilePhone & Char(10) & 
    "ADR:" & Office365Users.MyProfileV2().streetAddress & ";" & Office365Users.MyProfileV2().city & ";" & Office365Users.MyProfileV2().state & ";" &Office365Users.MyProfileV2().country & ";" & Office365Users.MyProfileV2().postalCode & Char(10) &
    "URL:" & "https://gthministries.org" & Char(10) &
    "END:VCARD"

     

     This was tested on Google Pixel 6. The data pulled is correct and store both business and mobile numbers as label WORK. The RFC changed for VCard 4.0 and it no longer seems to be able to pass a label with the number to our  contact apps such as (no Label, mobile, work, home, main, work fax, home fax, pager, other, custom) as those are backwards compatibility built in for phone hardware upgrades.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard