cancel
Showing results for 
Search instead for 
Did you mean: 

Extract the Value From Text

ChetanNinghot
Level 4
Hii
I Have Got Output As Text Data item -  1 day 5 hours

But I Want separated Value Like in separate separate Data item -  day=1                                                                                                                                                                                       hours=5      


but my output text formate may change every time like that 
1 day 5 hours 
OR
5 days 1 hour
OR 
9 hour 35 mins



------------------------------
Chetan Ninghot
------------------------------
1 BEST ANSWER

Helpful Answers

ArunK_J
Level 4
Hi Chetan,

I was able to replicate the scenario and get the desired output. I believe the information provided in below screenshots will be helpful.
I'm fetching Days, Hours, Minutes and Seconds in separate data items which you may use further as per your requirement.
19842.png
Choice stage:

19843.png

Multi calc stage:

19844.png
For each multi calc stage, update first line with corresponding text value (Day, Hour etc.). Note that I have not used plural terms so that when the input is singular like '1 Hour', it will also be captured.
In the second line, +4 is mentioned to skip the term 'Day' or 'Days'. For each multi calc stage, update this value accordingly. If needed, I can provide screenshots of the remaining multi calc stages.


------------------------------
Arun K J
------------------------------

View answer in original post

8 REPLIES 8

ArunK_J
Level 4
Hi Chetan,

I was able to replicate the scenario and get the desired output. I believe the information provided in below screenshots will be helpful.
I'm fetching Days, Hours, Minutes and Seconds in separate data items which you may use further as per your requirement.
19842.png
Choice stage:

19843.png

Multi calc stage:

19844.png
For each multi calc stage, update first line with corresponding text value (Day, Hour etc.). Note that I have not used plural terms so that when the input is singular like '1 Hour', it will also be captured.
In the second line, +4 is mentioned to skip the term 'Day' or 'Days'. For each multi calc stage, update this value accordingly. If needed, I can provide screenshots of the remaining multi calc stages.


------------------------------
Arun K J
------------------------------

Arun K J

Thank You For Your Response 

Pleas Send Another Calculation Screenshot. it may helful for me
I am Trying To Used It
If It Work Properly I will Inform You







------------------------------
Chetan Ninghot
------------------------------

@Chetan Ninghot
Please find the screenshots of all Multi calc stages below:
It worked for a number of different input values. Please let me know if you are facing any trouble with any particular input.

Days:
19851.png
Hours:
19852.png
Minutes:
19853.png
Seconds:
19854.png
Note:  Give the choice criterions in the same order as I have given for it to work as per the common timestamp logic.

------------------------------
Arun K J
------------------------------

Hi
Arun K J
Thanks For Prviding Solution Ans Solutuion Screenshot
its Work Properly For this input 25 Days 20 Hours 55 Minutes 40 Seconds 
even it work properly 
1)6 days 9 hours  2)23 hours 19 mins
but Its Fails for
1)2 day 1 hour
2)1 hour 19 mins

Note:-its work for singular Value not for Plurar Value
can you provide solution for it

------------------------------
Chetan Ninghot
------------------------------

@Chetan Ninghot,

The problem was not with Singular/Plural. It was with the case sensitivity. I have made a small correction to address that.
Please find the corrections below:

1) Added a stage to convert input to Upper case.
19868.png
2) Changed the terms like day, hour etc in Choice stage to upper case.
19869.png
3) ​Changed the terms in all multi calc stages to Upper case. Providing screenshot of multi calc stage for Day in Choice stage below:
19870.pngJust like this, change the Hour, Minute, and Second to all upper case -> HOUR, MINUTE, SECOND.
This will resolve the issue. Please check next comment for the correct output of the inputs you have mentioned.

------------------------------
Arun K J
Consultant - Automation Developer
WonderBotz India Pvt. Ltd.
------------------------------

@Chetan Ninghot
A) 1 day 5 hours
19878.png
B) 5 days 1 hour
19879.png
C) 9 hour 35 mins
19880.png
The only difference is, in the process I have built, the keyword used in the choice and the multi calc stage for minutes is 'MINUTE'. If the input you are using mentions it as min or mins, corresponding change needs to be done to mention 'MIN' as the keyword in the choice and in the multi calc stage for minutes criteria . You can make the correction as mentioned in the screenshots below:
Correction in Choice:
19881.png
​Correction in Multi Calc stage of minutes criteria:
19882.png
Please check and let me know of this resolves your issue.

------------------------------
Arun K J
Consultant - Automation Developer
WonderBotz India Pvt. Ltd.
------------------------------

Arun K J


Thank You very much providing proprer solution 
of my Query
Thanks Lot


------------------------------
Chetan Ninghot
------------------------------

Glad I could help!

------------------------------
Arun K J
Consultant - Automation Developer
WonderBotz India Pvt. Ltd.
------------------------------