I need some guidance to complete this task

Hi guys, i require some guidance in completing this task. I am confuse on how to make the phone brand name to be flexible in the config.xlsx or using the realme.

I have attached the document of the task.

Thank you in advance.
Task.docx (1.3 MB)

Hi @Tengku_Aliff

If you are using RE-Frame Work then use the mobile name in config file and by calling the key the value will be assigned to a variable in studio. For example the in config file the mobile = Realme is assigned then in studio try assigning Config(“mobile”).ToString to a variable.

If you are using the sequence then use an input dialogue box so that every time the code gets executed you need to give an input of mobile name on you want to search for.

Hope it helps!!

Thank you for the reply @vrdabberu. how about task number 6?

  1. Generate the report.
    *Report name, sheet name shall be flexible to change in the Config.xlsx file.
    *Multiple report could be generated with the same report name. (*Hint: using Date Time)

@Tengku_Aliff

Same as the mentioned above pass the sheet name and file name into config and use as the same in write range workbook.
example:

FileName = SampleFile+Now.Date.ToString("“ddMMyy”)
SheetName = Reuqired Data

Config(“FileName”).ToString --------------- pass this in the File path filed
Config(“SheetName”).Tostring --------- pass this in sheet name filed
Datatble variable should be passed in data table field.
So by using the write range workbook activity the excel will be automatically created at run time.

Regards

Hi @Tengku_Aliff

I have made automation based on your requirement in the attached xaml.
Change some places where you have to pass the values from the config file, means in If condition the mobile name and file name and sheet to store the extracted data (Productname, price, description).
Browser_Demo.xaml (51.2 KB)

Hope it helps!!

thank you @mkankatala for the help. how do i open the xaml file that you attached in studio?

First download the file by clicking on the above attachment in above message.
It was download to your system from that double click on that file it will open in your studio.

Happy Automation!!

@vrdabberu i am able to complete most of the task except for the table extraction part. for DESCRIPTION table extraction is inside the bracket of the phone title. How do i separate it?

the DESCRIPTION value should only contain inside the bracket value

@Tengku_Aliff

So you need to extract the data within the brackets right?

REGARDS

@vrdabberu yes that is correct. thats is the only blocker for now

Hi @Tengku_Aliff

Try this
Input.Split("("c)(1).Replace(")","")

I hope it helps!!

@Tengku_Aliff

Try this
use an assign activity and assign

CurrentRow("ProductName").ToString.Split("("c)(1).Replace(")","").ToString

OR ELSE

Use an for each row in data table and pass the data table variable into that and then use the multiply assign activity and assign the

Data = CurrentRow("Description").ToString
RequiredData = System.Text.RegularExpressions.Regex.Matches(Data.ToString,"(?<=\().*(?=\))")

and within for each row in data table use the for each activity and pass the variable example RequiredData and within for each you assign the data to another variable and so that variable is the reuired output.

REGARDS

1 Like

Use the Regular expressions to get the data between the braces.

System.Text.RegularExpressions.Regex.Matches(Your Variable here,"(?<=\().*(?=\))")

image

Use this one @Tengku_Aliff

thank you @mkankatala for the help. i will try and use regex to filter it

Welcome @Tengku_Aliff

Happy Automation!!

hi @vrdabberu i have completed most of the flow except for the DESCRIPTION column. how can i add it in a datatable and export it to excel?

@Tengku_Aliff

you can use the add data row activity so that the data can be sent to the existing datatable.

Regards

1 Like

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