cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KarolCzer
Helper I
Helper I

Change DataCardValue if one (and only) DisplayName appears

Hi PowerApps Users,

 

My case: I have a SharePoint list, based on my list I'm creating a PowerApp to display Suggestions for our company, where I included a PowerAutomate Flow which is updating "Created by" column to our service account, which has DisplayName in O365 "Process Automation", if someone wants to send that suggestion anonymously.

 

 

KarolCzer_0-1653426320893.png

 

I would like to make a change like this:

If suggestion "Created By is "Process Automation", change the text in DataCardValue1_1 to "Anonymous"".
Else - go Parent.Default

 

1 ACCEPTED SOLUTION

Accepted Solutions
EddieE
Solution Sage
Solution Sage

@KarolCzer 

'Created By' is a system generated table of records and you cannot change this, however, you could hide the DataCard and show a label if the text is "Process Automated". Something like this

 

// place this code on the Visible property of the DataCard
!(First(Self.SelectedItems).DisplayName = "Process Automation")

 

Then, add a label to this data card, place it directly over the top of the above DataCard (you may need to remove the above code to get it in the right location) then add this code to the Label

// Text property
"Anonymous"

// Visible property
(First(DataCardValue47.SelectedItems).DisplayName = "Process Automation")

 

Note: I've assumed that you just want a visual effect here which is for the users of your app and not looking to change the data in your source data. I don't even know if you can change any system generated data ( eg Created by, Created, Modified by, etc) although you maybe able to do this via Flow / Power Automate?

View solution in original post

2 REPLIES 2
EddieE
Solution Sage
Solution Sage

@KarolCzer 

'Created By' is a system generated table of records and you cannot change this, however, you could hide the DataCard and show a label if the text is "Process Automated". Something like this

 

// place this code on the Visible property of the DataCard
!(First(Self.SelectedItems).DisplayName = "Process Automation")

 

Then, add a label to this data card, place it directly over the top of the above DataCard (you may need to remove the above code to get it in the right location) then add this code to the Label

// Text property
"Anonymous"

// Visible property
(First(DataCardValue47.SelectedItems).DisplayName = "Process Automation")

 

Note: I've assumed that you just want a visual effect here which is for the users of your app and not looking to change the data in your source data. I don't even know if you can change any system generated data ( eg Created by, Created, Modified by, etc) although you maybe able to do this via Flow / Power Automate?

Hi @EddieE,

 

It worked, thanks!

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,647)