cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
i7-PG
Frequent Visitor

Name isnt valid. This identifier isnt recognized

 

 Hello i am a beginner and i hope you can help me. I would like to create a button that enable me to save the data in my database table after i clicking. But unfortunately i get the error Message „Name isnt valid. This identifier isnt recognized“. What do i have  to do to solve the problem. Iam thankful for every help 🙂

AF85E3BA-0B15-456D-A811-72896606D970.jpeg

2 ACCEPTED SOLUTIONS

Accepted Solutions

@i7-PG ,

 

Check the values which you are passing inside patch for create/update.

 

It looks like you are passing values to patch from text control. Modify your code to refer value from text property of the control. ex: control.Text

 

 

Regards,

Prakash

View solution in original post

PG_WorXz10
Resident Rockstar
Resident Rockstar

Hi @i7-PG ,

 

Also to add from the screenshot you shared I think you are adding values from the control into the datasource and not from the gallery item. If this is the case please try to update your code with below given one. 

Patch('Table_1',Defaults('Table_1'),{DHRTrackerDetailsID: DHRTrackerDetailsID.Text,NCID: NCIID.Text,RejectedDoc: RejectedDoc.Text,ReasonForReject: ReasonForReject.Text,RejectComment:RecentComment.Text });


If fields are number type in backend use below code 
Patch('Table_1',Defaults('Table_1'),{DHRTrackerDetailsID: Value(DHRTrackerDetailsID.Text),NCID:Value( NCIID.Text),RejectedDoc: Value(RejectedDoc.Text),ReasonForReject: Value(ReasonForReject.Text),RejectComment:Value(RecentComment.Text) });

 

Otherwise please the value inside the patch with below code. 

 

{DHRTrackerDetailsID: DHRTrackerDetailsID.Text,NCID: NCIID.Text,RejectedDoc: RejectedDoc.Text,ReasonForReject: ReasonForReject.Text,RejectComment:RecentComment.Text }

In case of number type below code 

{DHRTrackerDetailsID: Value(DHRTrackerDetailsID.Text),NCID:Value( NCIID.Text),RejectedDoc: Value(RejectedDoc.Text),ReasonForReject: Value(ReasonForReject.Text),RejectComment:Value(RecentComment.Text) }

 

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.

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

View solution in original post

14 REPLIES 14
PG_WorXz10
Resident Rockstar
Resident Rockstar

Hi @i7-PG ,

 

would you please try below code after updating the values as per your data source.

 

ForAll(DataSoruceName,Patch(DataSoruceName,Defaults(DataSoruceName),{ColumnName: Value})

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

i7-PG
Frequent Visitor

unfortunately it did not work.
I've searched for a long time but haven't found a solution yet. : /

In the end, I want to save my data in the database. So the data that is in my collection.

Prakash4691
Post Prodigy
Post Prodigy

@i7-PG ,

 

First of all the formula is wrong, follow @PG_WorXz10 as mentioned for patch.

 

Next, validate if all the control properties has been set correct. No error or warning should appear beside the control. Refresh the datasource, if you did any metadata changes like adding new column or updating existing column, by refresh it will get updated here.

 

Give thumps up and mark it as resolved, if it answers your question.

 

 

Regards,

Prakash

PG_WorXz10
Resident Rockstar
Resident Rockstar

Hi @i7-PG ,

 

What is the error message you are getting ?

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

i7-PG
Frequent Visitor

EFE94E1F-FE21-4F04-94BA-94CDFBF0EB0F.jpeg

do i have a Mistake?

I have the same error Message. And i also refreshed everthing ☹️

@i7-PG ,

 

is it azure sql or on-prem sql DB?

 

Could you show the datasource, you have connected to use in powerapps

 

 

 

38B745E9-6B9E-4C72-A2E7-7FF1495C9E29.jpeg

 this? @Prakash4691 

@i7-PG ,

 

No, it is data source section in powerapps.

datasource.PNG

 

Regards,

Prakash

5EF8374D-0160-47B3-A625-05F7245BA988.jpeg

BBF22075-17FD-455D-91D1-1647ADD65A02.jpeg

  @Prakash4691 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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