Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

How to make a Text input as hyperlink and should open outlook directly

(1) ShareShare
ReportReport
Posted on by 19
Hi Members,
 
I have a requirement on Power Apps and am a newbie of it. 
 
I have a SharePoint list called Software and this list has a field named Expert [Multiline text].
In Power Apps I have a gallery and a display form. When a user selects a particular item from the gallery, it displays all the values in the display form.
 
Additionally, there is a Button [Add Expert]. When the user clicks on it, it adds the current logged in user name in the Expert field (Text input field) as like below:
 
 
Now suppose, when an another user will open this app, and click on this Add Expert button, then that particular logged in user name will concatenate in the Expert field like below:
 
 
For this thing, I have used the code below on this Add Expert button's OnSelect property:
 
// First, update the DataCardValue3.Text based on the conditions

Set(
    UpdatedText,
    If(
        Not(IsBlank(DataCardValue3.Text)) && !IsMatch(
            DataCardValue3.Text,
            User().FullName
        ),
        DataCardValue3.Text & ", " & User().FullName,
        If(
            IsBlank(DataCardValue3.Text),
            User().FullName,
            DataCardValue3.Text     // If none of the condition are met, keep the existing text
        )
    )
);
// Now, patch the updated value to the SharePoint list

Patch(
    Software,
    LookUp(
        Software,
        ID = Gallery1_1.Selected.ID
    ),     // Find the item in SharePoint using the ID
    {Expert: UpdatedText     // Patch the UpdatedText value to the Expert column
}
);
Set(
    varShowPopup,
    false
)
 
 
Till now, its working fine. But I would like, whenever the specific user will click on the name (from the Expert field), it should open their specific outlook email. Suppose, if am the current user and click on the spreeti_local, then it should open my email outlook.
 
It will be really helpful if someone ll help me on this. Waiting for your response.
Thanks in Advance!
  • PattiF Profile Picture
    PattiF 19 on at
    How to make a Text input as hyperlink and should open outlook directly
    Hi ANB,
     
    It worked like charm. This is exactly what I was looking for.
    Thank you so much for your help!
     
    Thanks
  • ANB Profile Picture
    ANB 7,060 on at
    How to make a Text input as hyperlink and should open outlook directly
    Hi @PattiF,
     
    Apologies couldn't response on time.
     
    This is pretty straight forward code. By any chance are you using Software details as form? If yes, make sure that the gallery is outside the form.
     

    Please click Does this answer your question 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 a Like.


    Thanks,
    ANB
  • PattiF Profile Picture
    PattiF 19 on at
    How to make a Text input as hyperlink and should open outlook directly
    Hi ANB,
     
    Thank you so much for your suggestion.
    I have followed the same steps that you provided below.
     
    But when I click on any button, its not clickable at all. Suppose, I ll click on spreeti_local, then its not happening anything.
     
    Please help me on this if you have any other suggestion. Its lil urgent too.
    Thank You!
  • Verified answer
    ANB Profile Picture
    ANB 7,060 on at
    How to make a Text input as hyperlink and should open outlook directly
     
    Not sure how you want to achieve this, however I can give some suggestions.
     
    The code can be added on the OnSelect property of button. You can have gallery below the Expert field and in that gallery you can have one button. As shown in below image:
     
    The Items property of gallery will be 
    Split(TextInput1.Text,";")
    which will convert your string "User1;User2" into table. NOTE: TextInput1.Text is control name where you have users concatenate using semicolon.
     
    The Text property of button inside the gallery will be 
    ThisItem.Value
    
     
    OnSelect property of button will be 
    Launch("mailto:" &ThisItem.Value)

    Please click Does this answer your question 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 a Like.


    Thanks,
    ANB
  • PattiF Profile Picture
    PattiF 19 on at
    How to make a Text input as hyperlink and should open outlook directly
    Hi ANB,
     
    Thank you so much for your response.
     
    As am a new to this, can you please tell me exactly where I need to apply this formula? It ll be really helpful.
     
    Thanks
  • ANB Profile Picture
    ANB 7,060 on at
    How to make a Text input as hyperlink and should open outlook directly
    Hi @PattiF,
     
    If I understood your query then I would suggest you to use Launch Function. Example:
     
    Launch("mailto:abc@pqr.com")
    You can use Launch function like above and then it will open the Outlook client app.
     

    Please click Does this answer your question 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 a Like.


    Thanks,
    ANB

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,434

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,722

Leaderboard