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

datatype not matching

I am trying to export data to an sql server using patch. i have a text input called
"txtTrajectNummer" 
I set a variable using 
"Set(trajectNummer; txtTrajectNummer.Text)"
the sql column's datatype is a int though so i have an error that says that the datatypes arent matching. i also have a patch function
"Patch('[dbo].[Traject]'; Defaults('[dbo].[Traject]'); {trajectNummer: trajectNummer});;"
I tried to use the Value function but i dont really know how to use it. I'd appreciate some help. thanks in advance

2 ACCEPTED SOLUTIONS

Accepted Solutions
rsaikrishna
Dual Super User
Dual Super User

@Anonymous 

 

Use Value function as below:

Set(trajectNummer; Value(txtTrajectNummer.Text))

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

 

View solution in original post

@Anonymous 

 

Set(vistuig; dropVistuig.SelectedText.Value)

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

View solution in original post

7 REPLIES 7
rsaikrishna
Dual Super User
Dual Super User

@Anonymous 

 

Use Value function as below:

Set(trajectNummer; Value(txtTrajectNummer.Text))

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

 

View solution in original post

Anonymous
Not applicable

@rsaikrishna 
i have one more question. i have a dropdown input called 

"dropVistuig" 
also asigning the variable using
"Set(vistuig; dropVistuig.SelectedText)"
in the patch it looks like 
"Patch('[dbo].[Traject]'; Defaults('[dbo].[Traject]'); {vistuig: vistuig});;"
the problem here is that for some reason i cant put this in a column. the column's datatype is varchar(255) so its text. what am i doing wrong?

@Anonymous 

 

What is the exact error information you see in this case?

 

Regards

Krishna Rachakonda

 

 

Anonymous
Not applicable

@rsaikrishna 

"The type of this argument vistuig does not match with the expected type text. type record found"

@Anonymous 

 

Set(vistuig; dropVistuig.SelectedText.Value)

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

View solution in original post

Anonymous
Not applicable

@rsaikrishna 
Thank you alot

 

 

@Anonymous 

 

Glad that I was helpful.

 

Regards

Krishna Rachakonda

 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,347)