cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

Error when submit the form

Hi, 

 

I would like to do the follow after clicked the 'Tick'

1. SubmitForm

2. Run the FLOW

3. Navigate to next Screen

 

However, it returns error as shown below

1. SubmitForm (Success, and write to MSSQL)

2. Run the FLOW (Failed)

3. Navigate to next Screen (Success)

Anybody can help?

Q19a.PNG

 

Thanks in advance


Sam

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Error when submit the form

@samsam 

Once the form is submitted the information in ComboBox becomes cleared.  Therefore no data is being passed to your Flow.  However, you can access data from the last successful form submission using the LASTSUBMIT property.  Instead of the ComboBox1 you will need to reference fieldname though.

 

For example: let's say ComboBox1 submits information to the applicant field.  To retrieve the applicant displayname and pass it to the flow you should change your RUN code to this.  Note: applicant appears to be lowercase so I did not capitalize the fieldname

 

'DB-LeaveApplication2'.Run(Form1.LastSubmit.applicant.DisplayName)

 

---
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."

View solution in original post

3 REPLIES 3
Highlighted
Super User III
Super User III

Re: Error when submit the form

@samsam 

Once the form is submitted the information in ComboBox becomes cleared.  Therefore no data is being passed to your Flow.  However, you can access data from the last successful form submission using the LASTSUBMIT property.  Instead of the ComboBox1 you will need to reference fieldname though.

 

For example: let's say ComboBox1 submits information to the applicant field.  To retrieve the applicant displayname and pass it to the flow you should change your RUN code to this.  Note: applicant appears to be lowercase so I did not capitalize the fieldname

 

'DB-LeaveApplication2'.Run(Form1.LastSubmit.applicant.DisplayName)

 

---
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."

View solution in original post

Highlighted
Helper I
Helper I

Re: Error when submit the form

Hi @samsam 

When you want to take actions after a form has been Submitted you should put those actions into the Form's "OnSuccess" Property. Then these actions will only happen if the Submit was successful, as you don't want to navigate away if there are validation errors on your form.

 

As @mdevaney says, you should use the FormName.LastSubmit.FieldName construct to get the data to pass to your Flow.

 

Highlighted
Advocate II
Advocate II

Re: Error when submit the form

@mdevaney Thank you,  Form1.LastSubmit.applicant works perfectly 🙂

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (7,333)