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.

 

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.
Anonymous
Not applicable

@rsaikrishna 
Thank you alot

 

 

@Anonymous 

 

Glad that I was helpful.

 

Regards

Krishna Rachakonda

 

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 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 (2,214)