cancel
Showing results for 
Search instead for 
Did you mean: 

How can I extract a text from the Input html element

RoshiniSyed
Level 4
Hello,

I am trying to extract the name of .png from the below span element

[Data1] =<span style='width: 24px; height: 24px; margin-top: 3px; margin-right: 6px; margin-bottom: 3px; vertical-align: middle; display: inline-block; position: relative; box-sizing: border-box; background-image: url("/assets/icons/service-active.png"); background-size: cover;' data-tb-test-id="StatusGrid-node1-gateway-0"></span>

output should be: service-active.png

[Data1] = <span style='width: 24px; height: 24px; margin-top: 3px; margin-right: 6px; margin-bottom: 3px; vertical-align: middle; display: inline-block; position: relative; box-sizing: border-box; background-image: url("/assets/icons/stopped.png"); background-size: cover;' data-tb-test-id="StatusGrid-node1-gateway-0"></span>
output should be: stopped.png

I tried this, but unable to extract the required output.

Any help would be highly appreciated.

30683.png

------------------------------
Roshini Syed
------------------------------
1 BEST ANSWER

Helpful Answers

Hi @Roshini Syed,

You can use the following calculation expression and it should work for both of your use cases:
Left(Mid([Data1], InStr([Data1], "url(""/assets/icons/") + Len("url(""/assets/icons/"),InStr([Data1],"""); background-size: cover;")),InStr(Mid([Data1], InStr([Data1], "url(""/assets/icons/") + Len("url(""/assets/icons/"),InStr([Data1],"""); background-size: cover;")),"""); background-size: cover;")-1)​

Please find the below results for your reference:

Use Case I:
30659.png
Use Case II:
30660.png

------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
Wonderbotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

View answer in original post

5 REPLIES 5

Hi @Roshini Syed,

You can use the following calculation expression and it should work for both of your use cases:
Left(Mid([Data1], InStr([Data1], "url(""/assets/icons/") + Len("url(""/assets/icons/"),InStr([Data1],"""); background-size: cover;")),InStr(Mid([Data1], InStr([Data1], "url(""/assets/icons/") + Len("url(""/assets/icons/"),InStr([Data1],"""); background-size: cover;")),"""); background-size: cover;")-1)​

Please find the below results for your reference:

Use Case I:
30659.png
Use Case II:
30660.png

------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
Wonderbotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

Hi Devneet,

Thank you  for your Prompt reply, getting below error while evaluating expression 
30662.png
Any Suggestions please?

------------------------------
Roshini Syed
------------------------------

Hi @Roshini Syed

I try the Devneet's formula and is correct.

Maybe the problem is with the coma (",") against the semicolon (";")​

Left(Mid([Data1]; InStr([Data1]; "url(""/assets/icons/") + Len("url(""/assets/icons/");InStr([Data1];"""); background-size: cover;"));InStr(Mid([Data1], InStr([Data1]; "url(""/assets/icons/") + Len("url(""/assets/icons/");InStr([Data1],"""); background-size: cover;"));"""); background-size: cover;")-1)



Hope this helps you!

See you in the community, bye 🙂



------------------------------
Pablo Sarabia
Architect
Altamira Assets Management
Madrid
------------------------------

Hi Rohsini,

I tried to copy paste my formula again and I faced no errors. I think while copy pasting the formula directly you are getting some enter characters in between. Can you try to remove them and try this once again, this formula should definitely work

------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
Wonderbotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

Hi Devneet,

Thank you for your assistance. Definitely will try it out.

------------------------------
Roshini Syed
------------------------------