🎁 Advent Challenge #1 in the UiPath Community Forum❄️

Advent challenge #1 in the UiPath Community Forum


:timer_clock: Deadline

Submissions must be posted in this thread no later than the 2023-12-03T21:59:00Z, your time-zone.

For all the community enthusiasts out there: while some eagerly await the arrival of snow :snowflake:, others let their minds wander to tropical weather :palm_tree:, please go ahead, download the pdf challenge :point_down:, and start submitting your creative submissions.

UiPath Community Challenge #1_Mukesh Kala.pdf (378.6 KB)

:christmas_tree: We appreciate your cooperation in providing the required information and materials for your submission:

  1. Share the link to your code repository or furnish the actual code files if not submitting directly on the UiPath Community Forum.
  2. Clearly outline any dependencies necessary for running the code.
  3. Submit thorough documentation encompassing an overview of the solution, a breakdown of the code structure, and explanations for each module or function.
  4. Provide details on the setup and execution of the automation, including any required configuration steps.
  5. Share your insights into specific strategies or algorithms implemented to optimize the efficiency of the automation.

Thank you & good luck :santa: ,

Mukesh

8 Likes

Hello @mukeshkala

Here i submit the solution of the Advent_challenge1

Find the project file and documentation in the attached zip
Advent_Challenge_1.zip (67.1 KB)

Find the Documentation in

Advent_Challenge_1\Documentation\

Input path

Data\Input\

Regards
Sudharsan

1 Like

Hi @mukeshkala

Please locate the project and documentation within the enclosed zip file.

01. Advent_Challenge.zip (76 KB)

Regards
Gokul

1 Like

The instructions are wrong guys.
The output you show as expected has the data re-arranged but the column names are not, so the LastName data is in the column for Age

1 Like

The order of the columns in the message box is weird, should I just display them as per the problem statement?

Yes @Jon_Smith i think this is correct one and the output header provided may be typo

Regards
Sudharsan

HI,

Not practical, but short workflow using regex.

System.Text.RegularExpressions.Regex.Replace(strData,"(.+?),(.+?),(.+?),(.+?)(\r\n|$)","$1,$4,$2,$3$5")

AdventChallenge2023-1withDoc.zip (3.4 KB)

Regards,

2 Likes

Yes Please ignore the Typo

1 Like

Yes Please ignore the Typing

1 Like

Hi @mukeshkala @loredana_ifrim

Here is my submission for the Advent Challenge #1

AdventChallenge1.zip (5.0 KB)

Approach:

LINQ

Input File:

Data\Input\Input.txt

Documentation:

Documentation\Documentation.txt

Thank you
Rajneesh

Hello @mukeshkala @loredana_ifrim,

Here is my code for the first challenge.
AdventChallenge1.zip (3.4 KB)

Approach:

1. DataTable
2. Invoke Method

It’s simple, scalable, easy to read and understand to even naive UiPath learner.

Thanks,
Ashok

So since the goal I think is to share knowledge and ideas with the community, I will explain some of the design choices I make in this which are missing in some others so far I have seen or include features I don’t think get enough appreciation, such as testing.

I have had the input for this be an argument, not just the FilePath to the input but also the column order. This is to make the project flexible and re-usable so we could handle multiple file locations and multiple column layouts as needed so this can re-order any CSV. There is an argument to also include the csv separator.

After that I am re-arranging by reading the CSV to a datatable (I have that I need the Excel activities for this) and then setting the column position using ‘SetOrdinal’. This sets the column position in a data table. This requires the Invoke Method activity as SetOrdinal is a method of a Column.

After that I considered Testability so I made a TestCase for the Main.
I added data variations to this test data so I could test with other files should I need to.
I also have an expected result so I can validate the correct output is generated.
image

I wanted the Test Case to be able to execute without me needing to have a human interact with it so it could for example still work in a build pipeline or test dozens of files at once.
The message box in the requirements prevents this so I mocked the main so that the generated text goes to a log message and a new output argument so the Test can verify it, in this way my tests can run on their own.

Advent Challenge 1.zip (10.6 KB)

1 Like

Hi @mukeshkala

Solution of the Advent_challenge1

Kindly Find the project file and documentation in the attached zip

Advent_Challenge_1.zip (44.5 KB)

Regards
Gowtham.K

Hi @mukeshkala and @loredana_ifrim

Here is my submission of Advent Challenge 1

Find the project file and documentation in the attached zip.
Advent Challenge 1.zip (121.0 KB)

Method used: Linq

Input Path: Data\Input\Input.txt

Documentation Path: Advent Challenge 1\Documentation\ADVENT CHALLENGE.docx

Regards,
PS Parvathy

Here is my code with the available activities,

Generate datatable to convert text to dt.

filter datatable to rearrange the column.

Challenge1.zip (3.2 KB)

1 Like

Hello,

Here is my submission of Advent Challenge 1,

Reads a text file line by line, splitting each line by commas to create a Datatable, ensuring that each line has the expected number of values before adding it as a DataRow to the DataTable, excluding header line.
Advent Challenge (2).zip (3.7 KB)

1 Like

Hello @mukeshkala
Kindly Find the solution for the Advent Challenge #1 here :point_down: :robot:

AdventChallenge_01.zip (245.2 KB)

Regards,
Gokul Jayakumar

2 Likes

This much can be created with Coded automations + ChatGPT.
Advent challenge1.zip (2.0 KB)

2 Likes

Hi @mukeshkala ,

Here with attached the solution and documentation for the Advent Challenge 1 2023:

Input File : Data\Input\Input.txt

Documentation : Data\Documentation.docx

Solution :
Advent Challenge 1.zip (162.6 KB)

Best regards,
Narender Kumar

1 Like