Get assest

Hi All,

i have created one assest in orchestrator as text type, where i pased folder location(e.g C\Newfolder), then taken get assest activity and passed that assest name and created a variable to store it and trying to check if folder is existing or not. but it throws error type conversion from string to bool. if am i am changing the type assest to bool(since it is not taking any value in bool type)and trying to check same folder, it gives me wrong output.
how to rsolve this.

HI @Rakesh_Tiwari

→ Take the asset value by using the Get Asset activity and create an output for the Get Asset activity.
→ Pass the output of the Get Asset activity as the input to the Folder Exists activity.
->Create a variable as the output of the Folder Exists activity and pass that value as the condition in the IF activity as shown below.

HI @Rakesh_Tiwari

When using the Get asset value the output will be in the string value and while passing the output into the Folder Exists we are able to create an output variable for the folder exists and the folder exists activity gives the output as the Boolean variable so now the Boolean variable can be passed into the IF condition.

Regards

Hi @vrdabberu

i am not able to see the get assest whcih takes orchestrator folder path, as seen above in your reply, what i can see is below screenshot.
image

Hi @Rakesh_Tiwari

You can use the Get asset shown in you screenshot.

image

Regards

yes, same one i am using, so i used assest type as bool and passed same assest name in get assest and stored in output variable as as string, but how to check the folder is exist or not if we have not defined the folder path in orchestrator as bool type doesn’t accept any value.

Hi @Rakesh_Tiwari

Please give some other name as the output of the Get Asset activity and after the Get asset activity please use the folder exists activity.

Regards

Hi @Rakesh_Tiwari

Please check the below flow

Regards

Hi,
thanks for the solution, yes it worked.

i have one more issue , if file folder is not there then i need toc reate it, but i want to make it dynamically not static.
image
how to achieve it, should i create another assest?

Hi @Rakesh_Tiwari

What is the value saved in the asset?

Regards

no value, as i created that assest as bool type, so we don’t have option to store any value.

image

Hi @Rakesh_Tiwari

Change the type from Boolean to String and then Pass the value as per your requirement. Once you store the value please share the screenshot and I will share the workflow for you.

Regards

i am trying to create folder if not exists, but got error, since i am using same assest output.

image

Hi @Rakesh_Tiwari

Please remove the special characters and any new line if given in the folder name which need to be created.

Regards

i am not using any special character or new lines

H @Rakesh_Tiwari

Please check the attached workflow.

Main.xaml (13.0 KB)

Regards


Please refer the workflow img

1 Like

Hi @Rakesh_Tiwari

Can you share the asset value that stored in the orchestrator.

Regards

ok, got it, my mistake. i passed double quotes in assest value.

now worked, thanks for your support, i will mark the solution.

1 Like

Hi @Rakesh_Tiwari

Thank You.

Happy Automation!!