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 / Default text based on ...
Power Apps
Answered

Default text based on datacardvalue

(0) ShareShare
ReportReport
Posted on by 72

Hello All, 

 

I am trying to create a app where if an person scans a value in Datacardvalue4 ("PT0054-SERIAL NUMBER"), I want the text box to populate the text "Front". 

Also the datacardvalue4 ("PT0055-SERIAL NUMBER") then the text would be "Rear". 

 

Also the serial number changes for every part and the PT0054/PT0055 Will be common. So can someobody help me write a lookup function where it looks for just the first 5 digits and if the condition is met then populate the text box as Front/Rear. 

ATUFAILHAASAN_0-1707931406374.png

 

Categories:
I have the same question (0)
  • ANB Profile Picture
    7,252 Super User 2026 Season 1 on at

    Hi @ATUFAILHAASAN Try this on Label23 text property

     

     

    If(
     !IsBlank(
     Find(
     "PT0055",
     DataCardValue4.Text
     )
     ) And IsBlank(
     Find(
     "PT0054",
     DataCardValue4.Text
     )
     ),
     "Rear",
     !IsBlank(
     Find(
     "PT0054",
     DataCardValue4.Text
     )
     ) And IsBlank(
     Find(
     "PT0055",
     DataCardValue4.Text
     )
     ),
     "Front"
    )

     

     

    -----------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    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.👍

    Thanks,
    ANB


  • Verified answer
    Ethan_009 Profile Picture
    4,838 Moderator on at

    Hi @ATUFAILHAASAN ,

     

    You can try the following code as well:

    If(
     "PT0054" in Datacardvalue4.Text, "Front", 
     If(
     "PT0055" in Datacardvalue4.Text, "Rear", ""
     )
    )

     

    Hope this helps

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 883

#2
Valantis Profile Picture

Valantis 571

#3
11manish Profile Picture

11manish 477

Last 30 days Overall leaderboard