To level set, no CIS degree or programming/developer experience outside of starting UiPath a few months ago.
I have a process were I managed to get what I wanted accomplished, but I’m sure it could be done with far less steps. I was just hoping for some insight/feedback/resources to skill up in the area.
Scenario: There’s SQL file with coding & notes. The notes need to be parsed out. One of the dates needs to be updated to the current week’s Wednesday when the job runs on Thursday. The SQL code then needs to be pasted into another application an run.
Below is a screenshot of the workflow that I ultimately built:
This looks standard (maybe you can put annotations and change activity names to be descriptive of what you are doing for maintainability factors, also, give comments of what you are doing and everything can be put in a parallel activity for better speed {if your system has multiple cores}) apart from the split function that can be put in a single assign statement if you feel like you are using too many assign activities (of course we have ‘Multiple assign’ activity in UiPath latest FTS version) then maybe you could have done thsis -
The above conversion can be written like this in a single assign
strWednesday = (DateTime.Now.AddDays(-1*(7 + (DateTime.Now.DayOfWeek - DayOfWeek .Wednesday)) mod 7).Date).ToString(“yyyy-MM-dd”)
Also,
The above conversion can be seemingly condensed into the following:
strLastWeek = ((DateTime.Now.AddDays(-1*(7 + (DateTime.Now.DayOfWeek - DayOfWeek .Wednesday)) mod 7).Date).AddDays(-7)).ToString(“yyyy-MM-dd”)
I won’t claim that this is ‘optimal’ because instead of converting and keeping it in memory we are using conversion twice but it looks cleaner due to lesser activities and with multiple assign and parallel activity it looks much shorter.