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

Take username when a field choice changes

Hello all, 

 

This question might have been asked again, but I could't find something. 

 

In power apps, I have a txt field (1 line of text) and 1 choice column

 

The Default for the choice column is blank/null but the user can change it to "Approved" or "Rejected". 

 

There might be multiple users with the authority to change the choice column to "Approved" or "Rejected, because of that, I want the name of the user that did the change to be typed/written on the txt field (1 line of text) that I have.

 

Then, more users will log in and do various changes, but I don't want the Signer's name to be changed again. 

 

 Issue.png

1 ACCEPTED SOLUTION

Accepted Solutions
VJR
Super User
Super User

Here's to get you going.

On the dropdown's Onchange event add the below

 

If(
!IsBlank(Dropdown1.SelectedText.Value) && IsBlank(TextInput1.Text),
Set(
UserName,
User().FullName
)
)

 

In the Default property of the textbox add UserName

View solution in original post

7 REPLIES 7

@Kostika 

 

1. Unlock the Signer DataCard for editing by selecting it, then on right, click Advanced tab, then click "Unlock to change properties"

2. For the DisplayMode property of the Signer DataCard , use this formula:

 

DisplayMode.Disabled

 

 3a. If your form is already in Edit mode and has an Item it is editing, that should be all.

 

3b. If not, then for the Default property of the Signer DataCard , put something there you want (not sure what that would be for your scenario) - if not sure, skip this step.

 

See if it helps @Kostika 

Hey @poweractivate , thank you for your reply but it's not what I am looking for. 

 

I want to find a way to take user's name that changed the "Approval" from null to "approved" or "rejected" 

 

VJR
Super User
Super User

Here's to get you going.

On the dropdown's Onchange event add the below

 

If(
!IsBlank(Dropdown1.SelectedText.Value) && IsBlank(TextInput1.Text),
Set(
UserName,
User().FullName
)
)

 

In the Default property of the textbox add UserName

@Kostika 

 

Change the Default property of the Signer Data Card.

I am not sure how you know if it should be Approved or Rejected though.

Suppose you want it always Rejected.

Just set the Default property of the Data Card to Rejected then, for example .

I had no idea there was an option "On change" . Thanks for the solution

@Kostika 

 

Oh, you wanted to just auto populate the Signer field with the current user, when they change the drop down.

 

I did not understand it from your explanation, but if you want that, yes, @VJR solution should work for you in that case.

sorry for my bad explanation. 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,938)