Creating condition based on different Variables scraped from web

Hi All

I am working on a problem wherein i am scraping 2 values for 4 employee i.e their mail id and their Decision from web and storing them in variables lets say as following -

1.FirstEmpMail - abc@comp.com
2.SecondEmpMail - wer@comp.com
3.ThirdEmpMail - iuy@comp.com
4.FourthEmpMail - yur@comp.com
5.FirstEmpDecision - “APROVED”
6.SecondEmpDecision - NULL
7.ThirdEmpDecision - NULL
8.FourthEmpMail - “APPROVED”

Now based on whether the employees have “Approved” the Decision or it is NULL i need to add their mail id in outlook i.e for those of who have not yet approved the decision i need to send the mail only to them.

So basically when i am using the type into activity for writing to whom all i want to send the mail to i want some kind of condition which will block all those mail id’s whose respective Decisions are approved

How could i achieve this?

Thanks

@shekhawat.arjun1307

Can you share the screenshot from where are you scraping the values?

If the scraping value is like Email ID and Approval then no need to store those in variables instead you can filter from Datatable and send the mail accordingly

Hope this helps you

Thanks

Hi @shekhawat.arjun1307
Please use as reference the below attached screenshot

Thanks

This is the kind of table from where i am scraping the data

The signer column contains the mail id and Decision column will contain the decision for that employee.

Hi @pravin_calvin

Right now i am not saving the data in excel, is there anyway i can do it without involving data table?

Thanks

Hi @shekhawat.arjun1307

You can datascrape the table and loop through each row in the datatable and check whether the descion for each row is null and then do the process Accordingly

Regards

Nived N
Happy Automation

1 Like

@shekhawat.arjun1307

Scrape as a table, so you can use Filter Datatable activity which has Decision as Accept, then using For Each row activity you can add the address

Hope this helps you

Thanks

1 Like

Hi @NIVED_NAMBIAR @ksrinu070184
The extract structured data activity when i hover over this table does not highlight the entire table as one but instead separate block, does it mean that it cannot be extracted as an entire table?

@shekhawat.arjun1307

Just click on any block, It should prompt for extract table, If it detects as a table

Hope this helps you

Thanks

@shekhawat.arjun1307

I believe you are using old version of the Studio

So It’s better to click on the DataScraping and click on the table of the web

There you can able to know whether it detected as table or individual

Hope this helps you

Thanks

Yeah, this is the older version and figured that i need to use the Data scraping.

Is this fine i am filtering the rows based on whether the decision is empty if so keep the rows

Datatable

Thanks

I am unable to get how the type into activity be used inside the for each can you send some kind of screenshot?

Hi @pravin_calvin

When i use the assign activity it throws me this error

Option strict on disallows implicit conversions from ‘Boolean’ to 'string.

@shekhawat.arjun1307

Check as below

For Each Row give you datatable variable

In Type-> row(0).ToString-> 0 is nothing but index of the column value

Hope this helps you

Thanks

1 Like

Hi @shekhawat.arjun1307
Use the below expression

ExtractDataTable.Select(“Decision = ‘NULL’”).CopyToDataTable

Thanks

Hi @ksrinu070184

I think i am missing something because filter does not work and it is taking all the rows in, i am attaching the snaps can you see and tell what’s wrong in here.

image

Thanks

@shekhawat.arjun1307

Can you check the Datatable by using output Datatable activity and declare a string variable-> keep a message box and use the string variable, so that you can see the Datatable content and check whether It is empty or It is having any other value

Hope this may help you

thanks

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.