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 / Is there a way to repl...
Power Apps
Unanswered

Is there a way to replace text with IF or SWITCH

(0) ShareShare
ReportReport
Posted on by

Hello,

 

Is it possible to replace or erased a text field with a condition IF formula?

 

I tried using the following syntax. It does display "Vacant"; however, the source data in SharePoint list still shows the original employee name and not the text Vacant. Is there a way to actually replace the original value with Vacant. 

 

The syntax is used on the text property for Employee.

If(ThisItem.Status = "Vacant","Vacant",ThisItem.Employee)

 

Any help would be greatly appreciated.

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @punksterz626 

    What type of column is status?

  • punksterz626 Profile Picture
    on at

    Single line text

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @punksterz626 

    When I tested your formula in my gallery, it worked fine. 

  • punksterz626 Profile Picture
    on at

    It works fine on the display but the actual data in my share point list still still shows the original text(the employee name) not the replaced text vacant I want

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @punksterz626 

    Please provide the context, are you using it in a form? 

  • punksterz626 Profile Picture
    on at

    Correct. I have a form for updating records. The objective is to change the status and auto populate or remove certain data from a field

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @punksterz626 

    Ok, then you want to use it as the Update property of your Employee card. Once you Submit the form, the Employee name should change if the status is "Vacant".

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @punksterz626 

    Ok, then you want to use it as the Update property of your Employee card. Once you Submit the form, the Employee name should change if the status is "Vacant".

  • punksterz626 Profile Picture
    on at

    So after using If(ThisItem.Status = "Vacant","Vacant",ThisItem.Employee) on the update property on the employee data card I am unable to reverse the process. If I change the status to Active and manually change the employee name, the Vacant text remains and won't reflect the new name. I'm not sure why that is.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @punksterz626 

    What control is currently in the Employee card and what type of column is employee?

     

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 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard