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 / Set variable updating ...
Power Apps
Answered

Set variable updating very slow

(0) ShareShare
ReportReport
Posted on by 74

I am setting 6 variables for 6 checkboxes:

 

Set(resultvariable1, If(One.Value=true,"1",""));
Set(resultvariable2, If(Two.Value=true,"2",""));
Set(resultvariable3, If(Three.Value=true,"3",""));
Set(resultvariable4, If(Four.Value=true,"4",""));
Set(resultvariable5, If(Five.Value=true,"5",""));
Set(resultvariable6, If(Six.Value=true,"6",""))

 

I then have these going to a text field that will be sent out in an email. The issue is the text field takes a long time to update, so when the email is sent the body of the email remains blank as if the value was false. Any way to speed this up so if a user hits submit the values won't remain blank? I also have a dropdown and text input but those update instantly.

 

I am new to Power apps, so if there is a better way to do this I am all ears!

 

Body of email:

Text(Dropdown_Room.Selected.Name) &Char(13)&Char(13)&
Text(resultvariable1) & Char(13)&Char(13)&
Text(resultvariable2) & Char(13)&Char(13)&
Text(resultvariable3) & Char(13)&Char(13)&
Text(resultvariable4) & Char(13)&Char(13)&
Text(resultvariable5) & Char(13)&Char(13)&
Text(resultvariable6) & Char(13)&Char(13)&
Text(TextInput2)

 

Thanks in advance!!!!

 

 

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    156,425 Most Valuable Professional on at

    Hi @sskey89 ,

    Why not do it all directly in the email ?

    Dropdown_Room.Selected.Name & Char(13) & Char(13) &
    If(One.Value, "1") & Char(13) & Char(13) &
    If(Two.Value, "2") & Char(13) & Char(13) &
    If(Three.Value, "3") & Char(13) & Char(13) &
    If(Four.Value, "4") & Char(13) & Char(13) &
    If(Five.Value, "5") & Char(13) & Char(13) &
    If(Six.Value, "6") & Char(13) & Char(13) &
    TextInput2.Text

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • WarrenBelz Profile Picture
    156,425 Most Valuable Professional on at

    Disregard - duplicate

  • sskey89 Profile Picture
    74 on at

    I was testing to make sure that the values were updating accurately. Do you think the slow issue is caused by the text box updating separately?   

  • sskey89 Profile Picture
    74 on at

    Just tested that and the values still didn't update fast enough. The checkbox's are still showing blank in the email. Only the dropdown and textbox updated and were on the email.

  • sskey89 Profile Picture
    74 on at

    I am setting the variables here:

    sskey89_0-1663799117337.png

    Is there a better place to do that?

  • WarrenBelz Profile Picture
    156,425 Most Valuable Professional on at

    @sskey89 ,

    I assume you have dropped the Variables and used the code I supplied. Also can you please supply the actual code as Text - or try this

    With(
     {
     w1: If(One.Value, "1",""),
     w2: If(Two.Value, "2",""),
     w3: If(Three.Value, "3",""),
     w4: If(Four.Value, "4",""),
     w5: If(Five.Value, "5",""),
     w6: If(Six.Value, "6","")
     },
     Dropdown_Room.Selected.Name & Char(13) & Char(13) &
     w1 & Char(13) & Char(13) &
     w2 & Char(13) & Char(13) &
     w3 Char(13) & Char(13) &
     w4 & Char(13) & Char(13) &
     w5 & Char(13) & Char(13) &
     w6 & Char(13) & Char(13) &
     TextInput2.Text
    )

    The whole point is to ensure the values are set before the email is run.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • sskey89 Profile Picture
    74 on at

    Your first solution worked, I had a typo in the formula! Thank You!

  • sskey89 Profile Picture
    74 on at

    Would you know how to leave out results that are "false"? I am getting blank entries because of the formatting of the message and using: & Char(13) & Char(13).

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard