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 / Combining text formulas
Power Apps
Answered

Combining text formulas

(0) ShareShare
ReportReport
Posted on by 356

Need to set a default value of a datacard.

Currently I have Substitute(varSupplementalNumber.Title, "IH", "SP") which works fine.

 

But now I need to add to the formula, I need to replace the last 2 values (at the 15 position) of the new text string with the Users initials (set on App Start as varUserInitials).

 

I think both of these work but I have no idea on how to combine.

 

Substitute(varSupplementalNumber.Title, "IH", "SP")

Replace(varSupplementalNumber.Title, 15, 2, varUserInitials)

 

Thx community!

Categories:
  • KrishnaV Profile Picture
    5,023 on at

    Hi @slhangen ,

     

    Try this:

    Substitute(Replace(varSupplementalNumber.Title, 15, 2, varUserInitials), "IH", "SP")
    

     
    I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

    Regards,
    Krishna
    If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @slhangen 

     

    The combining of formula depends on the action you want to perform first.

     

    If you want to perform Replace action first, then the formula will be:

    Substitute(Replace(varSupplementalNumber.Title, 15, 2, varUserInitials), "IH", "SP")

     

    If you want to perform Substitute action first, then the formula will be:

    Replace(Substitute(varSupplementalNumber.Title, "IH", "SP"), 15, 2, varUserInitials)

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • slhangen Profile Picture
    356 on at

    Thanks so much!  I love this forum. Would have given up on Powerapps a long time ago without you guys.

  • slhangen Profile Picture
    356 on at

    Wonderful explanation! Thanks so much.  Still trying to wrap my head around compound formulas.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard