Skip to main content
Community site session details

Community site session details

Session Id : oydQl4T7nPT4ErdY65HUHs
Power Apps - Building Power Apps
Unanswered

Is there a way to replace text with IF or SWITCH

Like (0) ShareShare
ReportReport
Posted on 15 Mar 2023 20:40:13 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 15 Mar 2023 at 22:16:57
    Re: Is there a way to replace text with IF or SWITCH

    @punksterz626 

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

     

  • punksterz626 Profile Picture
    on 15 Mar 2023 at 21:53:50
    Re: Is there a way to replace text with IF or SWITCH

    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 15 Mar 2023 at 21:35:45
    Re: Is there a way to replace text with IF or SWITCH

    @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 15 Mar 2023 at 21:35:36
    Re: Is there a way to replace text with IF or SWITCH

    @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 15 Mar 2023 at 21:32:18
    Re: Is there a way to replace text with IF or SWITCH

    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 15 Mar 2023 at 21:29:55
    Re: Is there a way to replace text with IF or SWITCH

    @punksterz626 

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

  • punksterz626 Profile Picture
    on 15 Mar 2023 at 21:25:59
    Re: Is there a way to replace text with IF or SWITCH

    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 15 Mar 2023 at 21:23:58
    Re: Is there a way to replace text with IF or SWITCH

    @punksterz626 

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

  • punksterz626 Profile Picture
    on 15 Mar 2023 at 21:17:35
    Re: Is there a way to replace text with IF or SWITCH

    Single line text

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on 15 Mar 2023 at 21:16:18
    Re: Is there a way to replace text with IF or SWITCH

    @punksterz626 

    What type of column is status?

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

Announcing our 2025 Season 2 Super Users!

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete