cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sumaira
Post Prodigy
Post Prodigy

Store data to cds from power apps

Hello community experts,

There is an urgent requirement where i should store full name to user entity from text box in power apps

But the problem is since the full name is read only in cds

Please guide on how to achieve the below scenario

I have one text box named txtbox1 in power apps. And two fields named first name and last name in cds.

When i enter any name say "Sumaira N" in txtbox1 , Sumaira should be stored in first name and N should be stored in last name.

How do i achieve this requirement?

Kindly guide

Best Regards,

Sumaira

1 ACCEPTED SOLUTION

Accepted Solutions
PowerAddict
Super User
Super User

Do you know if there will always be two names only, first name and last name? What if someone types in a middle name or what if someone's first name is a combination of two names? 

 

Assuming it is just two names - one word for first name and another word for last name, you can do something like this: 

First(Split(TextInput1.Text, " ")).Result
and
Last(Split(TextInput1.Text, " ")).Result

You can use these two values in your Patch function. This can be adjusted and made more robust if there can be more name fields, so let me know. 

 

Here is a small demo: 

NameCreator.gif

 

Let me know if this helps. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

View solution in original post

3 REPLIES 3
PowerAddict
Super User
Super User

Do you know if there will always be two names only, first name and last name? What if someone types in a middle name or what if someone's first name is a combination of two names? 

 

Assuming it is just two names - one word for first name and another word for last name, you can do something like this: 

First(Split(TextInput1.Text, " ")).Result
and
Last(Split(TextInput1.Text, " ")).Result

You can use these two values in your Patch function. This can be adjusted and made more robust if there can be more name fields, so let me know. 

 

Here is a small demo: 

NameCreator.gif

 

Let me know if this helps. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

@PowerAddict Many thanks for the help

Thanks a lot again for such helpful steps

 

Glad I could help! Please feel free to reach out for more questions! Good luck with your app!

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,803)