Hi,
When extracting data from a web page, items A and B in the figure below can be extracted, but item C is <td></td> in the html, and when the data is extracted, it becomes an undefined item, and the data is neither blank nor null. Is there a way to assign a specific character (False) to an undefined item in Power Automate Desktop?
Kind Regards,
Toru
Hi Deenuji-san,
Thank you for your cooperation.
I was able to get it to work properly.
Does putting [0][0] after a variable mean that it's a way to specify the index of a list variable?
I learned a lot from your help. Thank you.
I'd like to ask again if I have the opportunity.
--
Kind Regards,
Toru
Please refer the below approach:
The datatable's Name column in the first row contains no value.
To assign the first row's first column value to a variable, I first check if the value is null using an if condition with the datatable variable - %datatable[0][0]%.
If a value exists, then I assign it to the variable.
Thanks,
Deenuji Loganathan 👩💻
Automation Evangelist 🤖
Follow me on LinkedIn 👥
-------------------------------------------------------------------------------------------------------------
If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀
You can assign your data table value to set variable like below:
%DataFromWebPage[0][0]%
Thanks,
Deenuji Loganathan 👩💻
Automation Evangelist 🤖
Follow me on LinkedIn 👥
-------------------------------------------------------------------------------------------------------------
If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀
Hi Deenuji-san,
Thank you for your reply.
The first capture is an example of when there is no data, the next capture is an example of when data is present.
--
Kind Regards,
Toru
My apologies if my ask is not clear. I am asking screenshot of your data table like below screenshot?
Thanks,
Deenuji Loganathan 👩💻
Automation Evangelist 🤖
Follow me on LinkedIn 👥
-------------------------------------------------------------------------------------------------------------
If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀
Hi Deenuji-san,
Thank you for your reply.
We are sorry, the PAD screen in the image below is in Japanese. The variable DataFromWebPage is set to the value C.
The image below is the html part. Does it make sense what I'm saying?
Kind Regards,
Toru
How is your DataFromWebPage values looks like ? Share some screenshot after hiding all senstive info?
Just want to see where the C items value present in your datatable.
But this is the syntax to read the value from datatable:
var variable1 = '%DataFromWebPage[0][0]%';
Thanks,
Deenuji Loganathan 👩💻
Automation Evangelist 🤖
Follow me on LinkedIn 👥
-------------------------------------------------------------------------------------------------------------
If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀
Hi Deenuji-san,
Thank you for your reply.
I cannot send it because there is company information in the html source.
Below is the information I would like to discuss first.
When I extract data from a web page using JavaScript (variable: DataFromWebPage),
an error occurs in the following part. In other words, the results extracted in <td></td> are neither blank nor null.
Is there a way to check this using JavaScript, or can I take another action to deal with it?
--
var variable1 = '%DataFromWebPage%';
--
Kind Regards,
Toru
You can use JavaScript to check if your C items have any value or are null, and then assign that value to a variable.
If you're unsure how to proceed, please share the HTML code of your C item, and I will help you accomplish this.
Thanks,
Deenuji Loganathan 👩💻
Automation Evangelist 🤖
Follow me on LinkedIn 👥
-------------------------------------------------------------------------------------------------------------
If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀