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 / Expandable Text Box in...
Power Apps
Answered

Expandable Text Box in Form // Overwriting Variable?

(0) ShareShare
ReportReport
Posted on by 5

Hello, I'm attempting to build out a task approval chain application. The functionality is basically set but I'm running into an issue with trying to make it more user-friendly.

I have a basic gallery setup where someone can either check on tasks they have started or are assigned to them in this window. They can also start a new task (form), by clicking the "+" icon at the top left.

gallery1_marked.PNG

 

The blank form that comes next is this:

The Data Card: Purpose/Recommendation

 

 

 

Default = ThisItem.Purpose

 

 

 

form1_marked.PNG

 I'd like to have the ability (possibly Rich Text if possible) to have someone click on the expand icon and have the view below:

 

TextInput_2

popup1_marked.PNG

I'm glossing over steps that I put in the link below, but the:

 

 

 

OnSelect = 
Patch(Routing, LookUp(Routing,ID=varRecord.ID),{Purpose: DataCardValue6 +
TextInput2_2.Text}
);

 

 

 

I've set it up where I can pull the text already put into the first screen, show up on this popup/enlarged typing screen. I followed the instructions here: Expandable Rich Text editor control in Power Apps – immersivecoder

 

What I would like is for it to then when clicked to un-expand, take what was typed and put it back into the main form. 

 

My problem: When I click the un-expand, the data is successfully transferred back to the first text box, but it then overwrites ALL form submissions past and future. Currently the only way to get it to successfully copy back to where the main screen is in the form is to write the data OnSelect to the DataCardValue6.Text box. Somehow I'm overwriting the entire applications variable, when all I want it to do is control that specific form's purpose box. 

 

Any ideas?

 

Thank you!

 

 

popup1_marked.PNG
gallery1_marked.PNG
form1_marked.PNG
Categories:
  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @letsrollusafa11 ,

     

    As saying in that blog, Default of the DataCardValue should be set to the variable as well. But it is for New Form only. You need to adapt this process to Edit mode of the form when you press the right arrow icon on the first screen.

     

    Please try and follow below steps:

    1. OnSelect of the arrow icon:

    Navigate(FormScreen, ScreenTransition.Fade, {varRecord: ThisItem, varPurpose: ThisItem.Purpose});

    2. modify on the Default of the DataCardValue6:

    varPorpose

    3. OnSelect of un-expand icon:

    Set(varPurpose, RichTextEditor2.HtmlText)

    4. OnSelect of expand icon:

    Set(varPurpose, DataCardValue6.HtmlText)

    5. Default of Rich Text Editor2:

    varPurpose

     

    This varPurpose variable will always store the "current“ text of Purpose. When navigating from the Gallery, it is the value saved in the data source, when editing in the two RTEs, it will be updated every time you press the expand/un-expand icons. Update the source should always rely on the submit button.

     

    Best regards,

  • letsrollusafa11 Profile Picture
    5 on at

    new_item_app.PNG

     Thank you for the assistance!

    Unfortunately, my issue is still somewhat present. 

    When I start a new form, clicking my + icon above, the information from previous edits is still evident on a new form (see Test Test).  If I open any pre-existing gallery itemA, edit its content, save it and return to the gallery view and start a new form itemB; itemA's "Purpose" is now the default text for new itemB.

    expand_app_test.PNG

     This was input from a different form.  But the default new form view with another items ""Purpose" overwritten in the DataCardValue Text.

     

    expand_app_2_test.PNG

    The above functionality almost works. The expand button opens the view above, I type my words, then click on the un-expand icon and the information is not immediately updated in the "Purpose" box. Only when I expand the field again and then un-expand once more does it finally show in the unexpanded box.

     

    It takes a couple clicks back and forth but it finally registers back on the original unexpanded form. My issue now is whatever I put in this box, or the un-epxanded box, is now the default for any subsequent new form. Thankfully, it is not overwriting existing items. 

     

    I appreciate your help thus far!

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @letsrollusafa11 ,

     

    OK I understood the scenario. Think differently, whenever you click the plus icon, the new form view will open and there should be nothing in the HTML text box, right? So simply you could clear the variable OnSelect of that icon. Please add below formula at the very beginning of the formula bar of OnSelect:

    Set(varPurpose, Blank())

     

    Best regards,

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 194 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 150

Last 30 days Overall leaderboard