cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Calculated Field in Entity - Split

I need to split a value in a calculated field; but i don't see a Split function; seems like the calculated functions are for dates and numbers.

Is there a way to split?

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Calculated Field in Entity - Split

Hi @MsMicrosoft ,

Could you please share a bit more about your scenario?

Do you want to split a calculated field value from your CDS Entity within your canvas app?

Further, could you please share a bit more about the calculated field that you mentioned?

 

The Split() function is supported within PowerApps currently. Please check the following article:

Split function

 

But the Split function is used to split a text string into a table of substrings. It could not be used to split a number value or Date value.

If you want to split a Date value, you could consider convert the Date value into a Date string value (using Text() function), then you could use the Split() function split this value. Please take a try with the following formula:

Split(
Text(DatePicker1.SelectedDate,"[$-en-US]mm/dd/yyyy"),
"/"
)

On your side, you should type:

Split(
      Text(YourDateValue,"[$-en-US]mm/dd/yyyy"), 
      "/"
)

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
New Member

Re: Calculated Field in Entity - Split

hi _ Kris Dai,

 

your solution works for canvas apps because i can use the Split function there but i don't know what to do for model driven apps.

I have an entity with a field of type User, and i need to split the user email to get the company domain; for example user@microsoft.com i want to split the email to get the string "microsoft".

 

thanks

Highlighted
Continued Contributor
Continued Contributor

Re: Calculated Field in Entity - Split

You're right that unfortunately the CDS calculated fields have hardly any useful string functions. An alternate option would be to use a workflow and a custom workflow activity to do the string manipulation - see   https://github.com/jlattimer/CRM-String-Workflow-Utilities

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (7,182)