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 / Save variable of a for...
Power Apps
Unanswered

Save variable of a form in excel

(1) ShareShare
ReportReport
Posted on by 132

Hello,

I created a form with a TextInput in it allowing the user to enter money. Like this (to have 2 decimal) : https://powerusers.microsoft.com/t5/Building-Power-Apps/Input-box-automatically-have-two-decimal-places/td-p/656890

I took the exact same function as the agreed solution from this post.

It works fine, but when I do a SubmitForm(form1) everything gets saved in my excel document except the TextInput with the money input which is left blank.

 

Thanks in advance 🙂

Categories:
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @taubry By default only the contents of DataCardValue fields are saved with the SubmitForm, and not the values of any possible random children controls you may have added into one or more Data Cards. - what out for this and check if it is the case for you. If it is make sure you are putting the value in DataCardValue of the Data Card - and not in some other custom control you added as a child of that Data Card.

  • taubry Profile Picture
    132 on at

    Thank you for your answer,

    I understand the problem but I cannot find DatacardValue in my Datacard ...

    I specify that it is a form of modification.

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @taubry Do you have screen shot of the Tree view with the Data Card expanded?

     

    Are you able to select the Money input field? If so please select it and try provide a screenshot of both the canvas in Edit mode and the Left side of Tree View while the Money field is selected. Maybe it will help me to check it.

  • taubry Profile Picture
    132 on at

    Voila :

    Capture.PNG

    DataCardValue15 is the Money input field. 

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @taubry  for DataCardValue15 what is the Default property set to right now?

    You said you used something like the solution of post, if you did, check right now what is the OnChange property of it? 

  • taubry Profile Picture
    132 on at

    exactly like the post's solution,

    in Default: var

    in OnChange: 

    Set(
     var;
     Text(
     Round(
     Value(DataCardValue15.Text);
     2
     );
     "[$-fr-FR]# ###,00"
     ) & "€"
    );;
    Reset(DataCardValue15)
  • taubry Profile Picture
    132 on at

    Anyone know how to do it?

    I tried to reset var in addition to form but without success...

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @taubry Montant HT_DataCard1

    Check the Update property of this.

    This is what is written back.

    There may be some problem with it - you may need to change it for it to work correctly. For example, maybe you need to put the var directly there instead of what it says now. See if it works.

     

    I bet it says something like DataCardValue15.Text in Update property of  Montant HT_DataCard1, right?

     

    Well of course it would be blank - the Text is blank!

     

    So why is the Text blank? Because the solution you use requires Resetting the Control - which makes  DataCardValue15.Text to be blank!

     

    So then the solution would be:

     

     Montant HT_DataCard1 Update Property - which now says something like DataCardValue15.Text

     

    Either change it to var or DataCardValue15.Default - then I think it might work

     

    Does it work?

  • taubry Profile Picture
    132 on at

    Hello,

    it doesn't work with var in update, it always logs 0 ... and setting DataCardValue15.Default there is an error.

    Thank you for your time on my problem.

  • taubry Profile Picture
    132 on at

    Should I abandon the monetary format?

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 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard