cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

Setting a textvalue after submitting form

Hello!

So basically I want some information to stay whenever they submit a ticket. I've tried it like this but it is not working: 

OnSelect of the button for sending the form away:

SubmitForm([@EditForm1]) && DataCardValue21.Text = Last(MancoTabel).Ordernummer (I've also tried to put this code on the ''Onsuccess" value of the form but no success either.

Then as the default value of DataCardValue21 I have this:

If(EditForm1.Mode=FormMode.New, ResetValue, Ordernummer)

How can I do this?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Hi @TimoMigchielsen ,

A variable would be the way to go (you were close) - I am not familiar with your European syntax, so I will use mine (; is a seperator of commands), I noticed you used &&, which is normally an And() operator.

Set(ResetValue,DataCardValue21.Text); 
SubmitForm([@EditForm1])

Then as the default value of DataCardValue21

If(
   EditForm1.Mode=FormMode.New, 
   ResetValue, 
   Ordernummer
)

 

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.

 

View solution in original post

7 REPLIES 7
Highlighted
Super User III
Super User III

Hi @TimoMigchielsen ,

A variable would be the way to go (you were close) - I am not familiar with your European syntax, so I will use mine (; is a seperator of commands), I noticed you used &&, which is normally an And() operator.

Set(ResetValue,DataCardValue21.Text); 
SubmitForm([@EditForm1])

Then as the default value of DataCardValue21

If(
   EditForm1.Mode=FormMode.New, 
   ResetValue, 
   Ordernummer
)

 

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.

 

View solution in original post

Highlighted

Thank you for your answer,

 

This is what happends:

https://gyazo.com/b907000da360958cd26f2bd073973a6e


What am I doing wrong?

Code for DataCardValue21 (default)

https://gyazo.com/712953741ed8522ded519e018c48b8c3

Code for OnSelect for submitting tickets:

https://gyazo.com/f64a6089d73cb5a870b9e8a4cbd4618f

@WarrenBelz 

 

Highlighted
Super User III
Super User III

Hi @TimoMigchielsen ,

Please check the Default values of the other cards - to test, change the Variable name from ResetValue to something else (vReset will do) - there is no logical reason all the other cards should be defaulting to a variable value unless their Default is set to that.

Highlighted

Worked, thanks! @WarrenBelz 

Highlighted

@TimoMigchielsen ,

A new record should take the default value, but resetting it can never hurt.

Highlighted

Now whenever I make a new one the default value will always be the last one. is there a way to reset this one to nothing when pressing a button?

@WarrenBelz 

Highlighted

Fixed it myself.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (11,905)