I have a formula that is extracting the first and last name from an email address.
Substitute(First(Split(glry_Email_Approval_from_mainform.Selected.FVP_Level3, "@")).Result,"."," ")
Now i need to do 2 things:
Formula to extract just the first name
and
formula to extract just the last name
Please.
Thanks
dave
Solved! Go to Solution.
?? why all of that? I provided a formula that will give you first and last name!!??
If you are now stating that the first/last name is separated by a period, then just change that in the formula.
With(
With(First(Split(glry_Email_Approval_from_mainform.Selected.FVP_Level3, "@")),
{
FirstName: First(Split(Result, ".")).Result,
LastName: Last(Split(Result, ".")).Result
}
),
UpdateIf(t_redbook_sp_ActivityCollection,
RBP_MASTER_ID = Value(RBK_EscalationId_txt.Text),
{ FUNCVP_EMAIL_ADDRESS: RBK_FVP.Text,
FUNCVP_FIRST_NAME: FirstName,
FUNCVP_LAST_NAME(assumed): LastName
}
)
)
How are you distinguishing the first and last name delimiter? For example, lets say your email address is your full name - DavidPowell - How would you determine what is first and what is last?
If you are assuming a space, then your formula would be:
With(First(Split(glry_Email_Approval_from_mainform.Selected.FVP_Level3, "@")),
{
FirstName: First(Split(Result, " ")).Result,
LastName: Last(Split(Result, " ")).Result
}
)
Of course...there are a lot of assumptions in the email having a space and also that it is truly just a first and last name.
The above produces a record with both first and last name columns in it.
Can this formula be used inside a "Patch" statement ?
Patch(t_redbook_sp_ActivityCollection,LookUp(t_redbook_sp_ActivityCollection, RBP_MASTER_ID = Value(RBK_EscalationId_txt.Text)),
{ FUNCVP_EMAIL_ADDRESS: RBK_FVP.Text,
FUNCVP_FIRST_NAME: With(First(Split(glry_Email_Approval_from_mainform.Selected.FVP_Level3, "@")),
{
FirstName: First(Split(Result, " ")).Result,LastName: Last(Split(Result, " ")).Result
}
)
}
)
Sure...
With(
With(First(Split(glry_Email_Approval_from_mainform.Selected.FVP_Level3, "@")),
{
FirstName: First(Split(Result, " ")).Result,
LastName: Last(Split(Result, " ")).Result
}
),
UpdateIf(t_redbook_sp_ActivityCollection,
RBP_MASTER_ID = Value(RBK_EscalationId_txt.Text),
{ FUNCVP_EMAIL_ADDRESS: RBK_FVP.Text,
FUNCVP_FIRST_NAME: FirstName,
FUNCVP_LAST_NAME(assumed): LastName
}
)
)
ok for the first name i did this :
First(Split(glry_Email_Approval_from_mainform.Selected.FVP_Level3, ".")).Result
for the second name i did this :
Left(Right(glry_Email_Approval_from_mainform.Selected.FVP_Level3,Len(glry_Email_Approval_from_mainform.Selected.FVP_Level3)-Find(".",glry_Email_Approval_from_mainform.Selected.FVP_Level3)),Find("@",Right(glry_Email_Approval_from_mainform.Selected.FVP_Level3,Len(glry_Email_Approval_from_mainform.Selected.FVP_Level3)-Find(".",glry_Email_Approval_from_mainform.Selected.FVP_Level3)))-1)
dave
?? why all of that? I provided a formula that will give you first and last name!!??
If you are now stating that the first/last name is separated by a period, then just change that in the formula.
With(
With(First(Split(glry_Email_Approval_from_mainform.Selected.FVP_Level3, "@")),
{
FirstName: First(Split(Result, ".")).Result,
LastName: Last(Split(Result, ".")).Result
}
),
UpdateIf(t_redbook_sp_ActivityCollection,
RBP_MASTER_ID = Value(RBK_EscalationId_txt.Text),
{ FUNCVP_EMAIL_ADDRESS: RBK_FVP.Text,
FUNCVP_FIRST_NAME: FirstName,
FUNCVP_LAST_NAME(assumed): LastName
}
)
)
I was just working on it while waiting for a response.
will use your code...and Thanks !!
Dave
Oh...gotcha. You had me wondering there for a moment. 😉 Glad that worked.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
196 | |
45 | |
45 | |
44 | |
36 |
User | Count |
---|---|
280 | |
81 | |
81 | |
79 | |
69 |