cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ahhollan
Helper V
Helper V

parenclose where EoF is expected error

I'm having trouble figuring out what is wrong with my formula. I keep getting the error Parenclose was found when EoF is expected. I'm sure it's that I haven't closed something off right. Below is my formula.

 

Set(varRecord,SubmitForm(Form3_1);If(!IsBlank(varRecord), Notify("Your request has been submitted! You may now close the window.", NotificationType.Success), Notify("Your request was not submitted", NotificationType.Error))

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @ahhollan ,

Back in my time zone - try

Set(
    varRecord,
    SubmitForm(Form3_1)
);
If(
   !IsEmpty(varRecord),
   Notify(
      "Your request has been submitted! You may now close the window.", 
      NotificationType.Success
   ),
   Notify(
      "Your request was not submitted", 
      NotificationType.Error
   )
)

 

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

9 REPLIES 9
Mr-Dang-MSFT
Power Apps
Power Apps

Hi @ahhollan ,

I've reformatted your formula for readability below:

Set(varRecord,SubmitForm(Form3_1);

If(
    !IsBlank(varRecord), 
    Notify("Your request has been submitted! You may now close the window.", NotificationType.Success), 
    Notify("Your request was not submitted", NotificationType.Error)
)

 

It looks like you're missing a parenthesis to close the Set() formula. 

Now  I get 'IsBlank has invalid argument' error. Any thoughts?

@ahhollan ,

Try - this is definitely valid syntax

Set(
    varRecord,
    SubmitForm(Form3_1)
);
If(
   !IsBlank(varRecord),
   Notify(
      "Your request has been submitted! You may now close the window.", 
      NotificationType.Success
   ),
   Notify(
      "Your request was not submitted", 
      NotificationType.Error
   )
)

 

 

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.

 get 'The function 'IsBlank' has some invalid arguments. 

Hi @ahhollan ,

If varRecord is indeed a full record which has many fields, it may not make sense to check if the full record itself is blank, but rather a specific field of the record.

 

So you can drill into varRecord.column_name and check if that specific column is blank. Change column_name to the column of your choice.

 

The resulting formula might look like this:

Set(varRecord,SubmitForm(Form3_1));

If(
    !IsBlank(varRecord.column_name), 
    Notify("Your request has been submitted! You may now close the window.", NotificationType.Success), 
    Notify("Your request was not submitted", NotificationType.Error)
)

 

Hi @ahhollan ,

Back in my time zone - try

Set(
    varRecord,
    SubmitForm(Form3_1)
);
If(
   !IsEmpty(varRecord),
   Notify(
      "Your request has been submitted! You may now close the window.", 
      NotificationType.Success
   ),
   Notify(
      "Your request was not submitted", 
      NotificationType.Error
   )
)

 

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

Hi @ahhollan ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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.

I ended up having to use your code in conjunction with a patch function. I did get it working.

Hi @ahhollan ,

Upon using SubmitForm, you can reference the record that was created by something like:

EditForm1.LastSubmit

 

Where EditForm1 is the name of the form control and LastSubmit drills into the record that was created. If you want to look at a specific column, add another dot and the column name:

EditForm1.LastSubmit.column_name

 

So you won't need to create a variable to show the record that was created when using SubmitForm.

 

But for greater ease and taking advantage of the form control's properties, when using SubmitForm, you can place each notify action in the form's OnSuccess and OnFailure properties. 

  • When a record is succesfully submitted, the OnSuccess notification will trigger.
  • When a record fails to be written, the form will show the fields that have an error and the Notify action you place in OnFailure will execute.

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,225)