Conversion of string variable to uipath.workday.staffing.change_job_subcategoryobject type

Hi,
I am trying to Automate workday related activities using workday Application scope in Uipath , Inside this we have few arguments as an input when we invoke the specific workday operation. One such Argument is Reason Reference which accepts the values of type uipath.workday.staffing.change_job_subcategoryobject , Now how to assign value to a variable of this type. The value will be like “Job_category_4”, but i am unable to assign this like how it is done for string. If it has to be converted to this datatype what is the method to be used and how to use it.Any help will be appreciated. Thank you.!

Hi ,
I’m not sure about workday. If this uipath.workday.staffing.change_job_subcategoryobject is user defined type . please try by following method .

string sDate = "02.09.2020";
DateTime dDate = (DateTime)Convert.ChangeType(sDate, typeof(DateTime));

Thank you, but how to do it in UIpath , should we use assign activities to use this expression or should we invoke code. could you help me in UIpath Specific.

Assign activity would be easy .
vreasonreference = (uipath.workday.staffing.change_job_subcategoryobject)Convert.ChangeType(Strvariable , typeof(uipath.workday.staffing.change_job_subcategoryobject));

Just a Trial and Error method.

1 Like

If this Error still exist ,
Try with the Tryparse method in Invoke Method Actvity

Parameter:
**In : String **
Out : uipath.workday.staffing.change_job_subcategoryobject

**Target Type : **
uipath.workday.staffing.change_job_subcategoryobject

Tried this. But no luck :frowning:

Can you share the screenshot of Error while getting Error in this method.

If Possible can you tell which package to download to get this type uipath.workday.staffing.change_job_subcategoryobject

Hi Priyanka,
You have to download Uipath.workday.activities and try establishing a workday connection with Tenant URL , and User credentials ,only then you will be able to connect to the service APIs in workday and once this is done, you have to use the activity invoke workday operation and there is a Job_Change service which has to be invoked where this variable will be used as inputs.PFB the screenshot

image

PFB the answer from UIpath. please let me know if you are able to decipher something on this answer. I am unable to understand the external variable he means.

image

As I don’t know the underlying implementation maybe it is not working but give a try on follwing:
declaring variables:

prototyped in immediate panel (can be done later within assign activity)
grafik
assigning the Value for setting up the XXX…IDType


Passing it to the JobType

receiving:

Hi ppr,
Thank you for the solution , i have tried it and fitted in the variables , it doesnt show any compiler error, i will have to work with all these variables and try to achieve this. meanwhile please have a look at how i have implemented using assign activity and let me know if it is correct.

ReasonReferenceID - assign activity
image

ReasonReference assign activity
vReasonReference.ID= {vReasonReferenceID}

image

Using it in Invoke Workday activities scope
image

It would be great , if you could verify this implementation and i shall work on doing it for all the necessary variable and test it.

Thanks,
Ahilesh

@ahilesh.madangopal
Unfortunately I dont have access to a Workday system. This limits my test options. But go ahead and give a try to get it working at your end