Replace sequence of characters in an attribute

0
Hello, I have the following problem. I need to replace teh sequence 'PROC_STEP_10_Approve' with only 'Approve' 'PROC_STEP_20_REJECT" with only 'Reject' ... etc, I'm having more of these. I have an entity which has a string which contains the whole sequence. Then, I need to count and bundle the results based on the last part 'Approve' , 'Reject' etcIs there a quick solution for this?
asked
1 answers
0

Hello,

Your request seems to be a great fit for Mendix OQL (View Entities - Replace)

There's the REPLACE function that may be the perfect fit for this task.

Try using view entities and see if the following query is what you need


SELECT

REPLACE(T/TechnicalName, 'PROC_STEP_', '') AS UserFriendlyName,

COUNT(T/ID) AS TotalTasks

FROM

YourModule.Task T

GROUP BY

UserFriendlyName

Hope this helps!

answered