cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Concat function has invalid arguments

Im new here and trying to post for help.. Below is my code and Im getting an error that states that the "The function Concat has some invalid arguments".. What makes the arguments invalid?

 

office365Outlook.SendEmail("somebody@outlook.com", "New Ticket", Concat(Incident, "Name: " & Name & Char(10) & "Phone: " & Phone & Char(10) & "Email: " & Email & Char(10) & "Category: " & Category & Char(10) & "Impact: " & Impact & Char(10) & "Short Description: " & 'Short Description' & Char(10) & "Full Description: " & 'Full Description' & Char(10)))

 

This code is attached to an "Email" button in a form, that when pressed should send out..

Name:

Phone:

Email:

Impact:

Short Description:

Full Description:

13 REPLIES 13
Highlighted
Super User III
Super User III

Re: Concat function has invalid arguments

@Anonymous 

Are all of your fields single-line text?  If you are using a Choice column type for category you would need to add .Value as shown below.  Is also suggest <br> tags when writing an email body since it is HTML.

Office365Outlook.SendEmail(
    "somebody@outlook.com",
    "New Ticket",
    Concat(Incident,
        "
        Name: " & Name & "<br>
        Phone: " & Phone & "<br>
        Email: " & Email & "<br>
        Category: " & Category.Value & "<br>
        Impact: " & Impact & "<br>
        Short Description: " & 'Short Description' & "<br>
        Full Description: " & 'Full Description'
    )
)

 

The best way to figure out which argument is causing the problem is to remove them one-by-one.

 

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

Highlighted
Anonymous
Not applicable

Re: Concat function has invalid arguments

Still getting the same error. Category but I do understand the response.. Category has drop down content and so does "Impact".. I get the same error, even if I use just one argument and I not sure why.. eg: Concat(Incident, "Name: " & Name & Char(10))

Highlighted
Super User III
Super User III

Re: Concat function has invalid arguments

@Anonymous 

Can you take a screenshot of some data in the Incident datasource/collection?

Highlighted
Anonymous
Not applicable

Re: Concat function has invalid arguments

There is no collection or links.. Its a simple form that the user fills in, and once the click Submit, it should email the contents of the form.. This should be a simple undertaking but Im not sure whats causing the issue.

Highlighted
Anonymous
Not applicable

Re: Concat function has invalid arguments

also, I went back in and removed the "Match." value from the arguments.

Highlighted
Super User III
Super User III

Re: Concat function has invalid arguments

@Anonymous 

Please show a screenshot without the MATCH present.


Also, can you share what Incidents looks like?

 

Highlighted
Anonymous
Not applicable

Re: Concat function has invalid arguments

I have taken out all of the arguments except one and am still getting the same error. The form itself is called incident and its a really simple form. I just need to have the contents of the form emailed after its filled out... There are no associated collections. 

Highlighted
Super User III
Super User III

Re: Concat function has invalid arguments

@Anonymous 

Incident is definitely the problem.  You cannot reference 'Incident' in the CONCAT formula because it is not a Table: it is a form.  After the form is submitted successfully you can use Incident.LastSubmit to retrieve a Table of values and place it in CONCAT.

 

You can try this code in the OnSuccess property of the form.

Office365Outlook.SendEmail(
    "somebody@outlook.com",
    "New Ticket",
    Concat(Incident.LastSubmit,
        "
        Name: " & Name & "<br>
        Phone: " & Phone & "<br>
        Email: " & Email & "<br>
        Category: " & Category.Value & "<br>
        Impact: " & Impact & "<br>
        Short Description: " & 'Short Description' & "<br>
        Full Description: " & 'Full Description'
    )
)
Highlighted
Anonymous
Not applicable

Re: Concat function has invalid arguments

I understand your answer and but am unable to impliment the solution. There is no OnSuccess function associated with this form.. I do have OnSelect that is associated with the Submit button but that is the closest thing that I see, to what you are describing.. Is there a way for me to add this functionality?

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

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 (5,845)