web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Powerapps: Updating a ...
Power Apps
Unanswered

Powerapps: Updating a global variable After ComboBox OnSelect or OnChange

(0) ShareShare
ReportReport
Posted on by

Hi All,

 

Ok I have spent like 4 hours trying to figure this out but i am already at a loss. Let me describe what i want to do:

 

DataSource: Sharepoint List (RosterLevel) - stores a selected group of people from a people picker

comboboxpeoplepicker.JPG

combobox:  Items: Office365Users.SearchUser({searchTerm:Peoplepicker2.SearchText}) (there are 4 similar peoplepickers and textinputs because there are a total of 4 leads

 

I want the text input to pick the current information of Lead1 on load (or on visible?) because i need to send an email ONLY to those people who were recently added as a lead. So on a usual scenario, only 1 Lead is added and so he's the only one who will receive an email, the others who were not changed will not receive an email

 

 

Here is what i have tried so far:

 

* Set a global variable to hold current Lead information based off a DataCardValue

Set(currentLead1, dcvLead1); Set(currentLead1Email, dcvLead1Email);

 

* Default value for TextInput_lead: currentlead1.text. This is able to pull the dcvLead1 value with no issues

 

* Now I am trying to modify the value of the above variables by using the formula below via OnSelect/OnChange:

 

currentLead1.Text = Peoplepicker1.Selected.DisplayName;

 

I was expecting that this will throw the value of the peoplepicker to the currentlead1 variable and the TextInput will also change but nothing is happening. How do I throw the selected value from the people picker down to the TextInput?

 

Again this is important because i have an If condition that checks whether the current entry was changed for LeadName and LeadEmail, as i only need to send an email to those who are going to be recently added.

 

Thanks in advance.

 

 

 

 

Categories:
I have the same question (0)
  • SaiKrishnaGudluru Profile Picture
    499 on at

    If everything is in one screen you can leverage UpdateContext - in case to use a single global variable for different value setting, try emptying the variable value on each update complete.

  • Community Power Platform Member Profile Picture
    on at

    Hi Krish,

     

    i tried updatecontext, didn't work. turns out there is some data flow mechanic in flow that doesn't allow one variable to be changed on demand or something.

     

    I ended up removing the if else and reorganized the form to remove the dependency on checking if the the record is new or not.

     

    Thank you though.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard