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 / Drop down value appending
Power Apps
Answered

Drop down value appending

(0) ShareShare
ReportReport
Posted on by 83

Hi ,

 

I have a form where in i have a text box and dropdown. basically i want to append drop down value to tet box which i am able to do it. however on change of it i want only the dropdown value to be replaced to selected value  . I have written the below formule but it fails.  i have written on chnage event of dropdown. Attached is the image
UpdateContext({Hardisk: DataCardValue34.Text});
UpdateContext({DRP: DataCardValue1_1.Selected.Value});
UpdateContext({MYDP:Right(Hardisk,2) &" "& DRP})

MYPROCES.png
Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @santukondapally 
    Here's my suggested code.  I have changed only the UPDATECONTEXT of MYDP.

    UpdateContext({Hardisk: DataCardValue34.Text});
    UpdateContext({DRP: DataCardValue1_1.Selected.Value});
    UpdateContext({MYDP: Left(Hardisk, Len(Hardisk)-2) & DRP});

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Verified answer
    Florian_Kleinz Profile Picture
    227 on at

    Hello,

     

    The problem is that after you update the text with DRP it's part of the text, so you append each new DPR.

     

    Maybe you only store the number in the harddisk variable:

    Left(TextInput1.Text;Len(TextInput1.Text)-3)

     In this case 200 MB is cutted to 200 and then another unit can be appended.

    Alternatively you could:

    Substitute(TextInput1.Text,Right(TextInput1.Text,2),DropDown.Selected.Value)

     

    Generally it would be easier not to append these field, especially since you want to be able to change the number as well.

    But since this might be necessary due to circumstances I am not fully aware of, please try my proposed solution.

  • santukondapally Profile Picture
    83 on at

    When i tried On Drop Down Change the above formulae is behaving like this '

     

    for ex 200 and selected MB 

    santukondapally_1-1595088788757.png

     

     

  • santukondapally Profile Picture
    83 on at

    same for your solution on dropdown change @Florian_Kleinz 

  • santukondapally Profile Picture
    83 on at

    Sorry your solution worked for me . What i have done is on change event of my text box Hard disk

    I put like this UpdateContext({Defaultval:DataCardValue34.Text &" "& DataCardValue1_1.Selected.Value}) And my default value for my text box i put your formule  Substitute(Defaultval,Right(Defaultval,2),DataCardValue1_1.Selected.Value) this works for new item.

     

    Edit item i need to check this. But this helped me a lot.

     

     

     

     

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