Trouble shooting on Switch


#1

Hi,

Can someone please take a look at my xaml? I tried to assign different value depending on the status of the cloud drive syncing process using the Switch Function. The scrapped message output seems to be correct, but the switch function is not working.

Many Thanks in advance!Main.xaml (12.4 KB)


#2

I narrow down the problem to that the Text I scraped from the cloud drive status has a hidden Paragraph Mark (^p) in it, causing the Switch Function to not work. However, I don’t know how to change the variable type to trim the text.

By simply changing the Variable type to from generic value to String will give me validation error.
the .Trim argument will not work on generic value,


#3

Hi @TtttgU

I guess you are using “Full Text” to scrap the text out from the cloud drive status. Can you please try using the “ignore hidden” parameter , so that unwanted text is not considered. Alternatively you can try using “Native” method to try scraping.

Let me know if it works.

Regards,
Gourav


#4

Hi Gourav,

I have tried scrapping with Native or OCR, even playing around with different OCR engine and scaling but no text can be extracted that way.

I tried to check the “Ignore hidden” box but the Paragraph Mark is still there.

Is there any work around?


#5

I switched from Scrapping to Get Text and it works. Thanks for your help!!


#6

hi @TtttgU Just one more piece of information,on your question to change the variable type.
If you have a variable called “Var1” which is of generic type, you can define another variable “Var2= Var1.toString()” and Var2 can be defined as "String " variable type. This will help you to apply all string functions on “Var2”.

Since, you have already resolved this issue. Can you please mark this thread as solved?