Highlighted
Super Contributor.
Super Contributor.
111 views

Extract text before certain text in ALM Workflow

Jump to solution

Using workflow, I am storing Requirement name as Feature.Name

Feature.Name will be in format like: F12345: Feature Name

I need code to extract only F12345 and store in Feature_ID

I tried below code:

Feature_ID =Left(Feature.Name,(Find(":",Feature.Name,1)-1)) but seems not working

also tried 

Feature_ID = GetStrUntil(":",Feature.Name)  but it seems this is also not working.

Can you please let me know how to extract untill ":" and store in Feature_ID

0 Likes
1 Solution

Accepted Solutions
Highlighted
Knowledge Partner Knowledge Partner
Knowledge Partner

@Priyotosh_ganguly,

use split function instead and get the first element from array.

refer to below vbscript example:

Dim arr
arr = Split("PROMOTIC:is:fun!", ":")
'arr(0) contains "PROMOTIC"
'arr(1) contains "is"
'arr(2) contains "fun!"

View solution in original post

0 Likes
3 Replies
Highlighted
Super Contributor.
Super Contributor.

Anyone hasany input on this?

Thanks in advance.

0 Likes
Highlighted
Knowledge Partner Knowledge Partner
Knowledge Partner

@Priyotosh_ganguly,

use split function instead and get the first element from array.

refer to below vbscript example:

Dim arr
arr = Split("PROMOTIC:is:fun!", ":")
'arr(0) contains "PROMOTIC"
'arr(1) contains "is"
'arr(2) contains "fun!"

View solution in original post

0 Likes
Highlighted
Super Contributor.
Super Contributor.
Excellent solution Srihari!!! Works perfectly for me.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.