Use of data Table

I have a database output(RefNo,ID,Request Type,Description) as shown:

RefNo,ID,Request Type,Description
SR-2020-0002,17,ABC,Object Type : A Project
Object Name: RPA_TEST
Testing of BOT
SR-2020-0002,17,ABC,Object Type : B Project
Object Name: RPA_FIN
Testing of BOT
SR-2020-0003,16,CS Test,Object Type : A Project
Object Name: RPA_OUT
This is to be performed by TA team (Hermi).

Once I find the description have Object Type : B Project perform tasks a- b or else skip the row.
a) For the Request Type : ABC, perform one workflow (there are 4 workflows). Thinking to use switch case activity.
b) Trim the Object_Name: RPA_TEST to show RPA_TEST and pass down the value to select workflow. (*if may other Object Name e.g RPA_OUT, RPA_FIN and etc).

Appreciate you guys help. Thank you.

@Perri Actually I feel you have answered your own Question :sweat_smile:, Can you tell us at What part are you facing Difficulties?

Sorry :blush:never mentioned which part my difficulties. I hv problem to start the database to perform the task a and b. How to get object type under the description and then perform the either perform task a and b or skip the two tasks and proceed another row ? Thank you

Sorry not database :sweat_smile:is datatable.

@Perri Since you need to Perform Different Operations based on the Request Type, you can do so using Switch Cases. The First Switch case can be used when Request Type is ABC, Second Switch case can be used when Object Type is CS Test, In that way you can Perform Operations separately for Separate Types.

Before the Switch you’ll need to Filter the Datatable with only Object Type : B Project.

Since you want to Process Each Row, I guess you need to Follow these Steps:

  1. For Each Row of your Datatable Output
    Inside For Each Row, Use If Activity with Condition row(“Description”).ToString.Contains(“B Project”)
    If True You can use the Switch Cases for Request Types that I have mentioned above.
    Else
    Do not Do Anything. (Skipping the Row)

I guess this is the Sequence you need to follow :sweat_smile:

1 Like

I have a difficulties to spilt my column info and get the value to pass down to other workflow. in the description column shown in every row:
Object Type : A Project
Object Name: RPA_TEST
Testing of BOT
SR-2020-0002,17,ABC,Object Type : B Project

datatable output named ExtractDataTable

RefNo,ID,Request Type,Description
SR-2020-0002,17,ABC,Object Type : A Project
Object Name: RPA_TEST
Testing of BOT
SR-2020-0002,17,ABC,Object Type : B Project
Object Name: RPA_FIN
Testing of BOT
SR-2020-0003,16,CS Test,Object Type : A Project
Object Name: RPA_OUT
This is to be performed by TA team (Hermi).

How to get the value A project under description to perform switch case activity as well as getting the RPA_TEST to trigger another workflow.

@Perri Use Can use this Split method :
Split(Split(row(“Dscription”).ToString,“Object Type :”)(1),“Object Name:”)(0) to get the Object Type Value

Appreciate your help. will make a try :slight_smile:

1 Like

I have tried the switch case and split method that work pretty good. Thank you.
Now, thinking how to open the SR for that row that met the critical . I need to perform the certain task in rdp and collect back some info to close the SR before going two another row of SR.

Data scrapping result:
RefNo,ID,Request Type,Description
SR-2020-0002,17,ABC,Object Type : A Project
Object Name: RPA_TEST
Testing of BOT
SR-2020-0003,17,ABC,Object Type : B Project
Object Name: RPA_FIN
Testing of BOT
SR-2020-0004,16,CS Test,Object Type : A Project
Object Name: RPA_OUT
This is to be performed by TA team (Hermi).

@Perri Can you explain in Detail what should be done? :sweat_smile:, Again We’ll need to know what is the Difficulty you’re facing ?

After having data scrapping on the SR pending page, I would like to use the result to open the SR when found the row meet the critical (Description: object Type: Project A). Once SR opened, I will try to get some info from the rdp and input the info into SR as to close it. After SR has closed, proceed to row 2 till the end.

my difficulty is to open the SR using data scrapping output (data table)? possible to do it ?

Thank you.

@Perri Can you tell us What do you do Manually to open the SR ? Also what is SR :sweat_smile:

sorry :grinning: SR is the Service request created using SharePoint.

@Perri What are the Steps you do manually to Create A Service Request in Sharepoint?

  1. Go the the given URL
  2. Go the the Service Request menu bar-> create Service Request (SR)
  3. Input the info to the compulsory fields.

Once u submitted, u can see your SR in the landing view. This is the view that I use data scrapping activity to have data table.

@Perri I don’t know if that’s possible by using any Sharepoint Activities (Need to Confirm it).
But it may as well be done usign UI Automation Activities. For Instance You can try the Following Steps:

  1. Go to the Given Url (Use Open Browser Activity, with the URL specified, You have to Login using your Credentials First)
  2. Go to the Service Request Menu Bar (You can try using Click Activity to go to Service Request Menu Bar)
  3. Input the Info into the Fields (Try Type into Activity)

These Must work , But also I need to know if there is an Easier method to create a Service Request using Any Sharepoint Activities, I’ll Call for some help :sweat_smile:

@Lucas.Pimenta @Lahiru.Fernando

I’m able to use split method to get the Object Type in Description. May I know from same row, possible to get the ID? After got the ID and need to open browser and append it in url (e.g. www.sample.com.sg/17) ?

Currently, I use For Each Row to get the objectType, then follow for switch activity as shown.

Thank you.

Data scrapping result:
RefNo,ID,Request Type,Description
SR-2020-0002,17,ABC,Object Type : A Project
Object Name: RPA_TEST
Testing of BOT
SR-2020-0003,17,ABC,Object Type : B Project
Object Name: RPA_FIN
Testing of BOT
SR-2020-0004,16,CS Test,Object Type : A Project
Object Name: RPA_OUT
This is to be performed by TA team (Hermi).

@Perri Yes, It’s possible. Since you are in the For Each Row, you can use row(“ID”).toString to get the ID value.