Ignore blank column and jump for next step

Hi, sorry if this is duplicate, but, is there a simple way to ignore a blank column and jump to the next step?
For example: let’s say I need to fill out 3 fields A,B,C – but, column “B” is empty, like this:

A,C

How can I coding into a simple way to jump blank columns like this and go directly to the “C” column, to avoid fill out the field of the column “B” with blank data and/or not replace the current data I have in the form?

Thank you so much and sorry if this is duplicated.

Ui vision for works requires that all csv columns contain the same number of elements, so if you have a csv organized like this ui vision will give an inconsistency error and it won’t work. therefore you must always have all the rows of the csv with the same number of columns otherwise automation does not even start.

Here info about this error

Hello, the number of columns is the same and always work, but I think I not explain better. Let me try:

1-I have the same number of columns, Macro runs without any problem
2-on or other column, sometimes is blank (which means that not contais nothing and will fill out my form with blank data (here is the point), I do not want fill out my form with blank data, because if my form already contains some data, it will replace by a blank data
3-so, how can I ignore this step and jump to the next automatically?

Thank you!

Ok

You must use an if_v2 to skip field

This is the code to fill field only if COL1 have a value, edit with your COL number and xpath, you must use it in every field that use COL of csv

{
      "Command": "if_v2",
      "Target": "${!COL1}.length > 0",
      "Value": ""
    },
    {
      "Command": "type",
      "Target": "xpath=//input[@name='name']",
      "Value": "${!COL1}"
    },
    {
      "Command": "end",
      "Target": "",
      "Value": ""
    },

Thank you for your valuable help. This is the portion I want to skip for the next step, in case I have the column blank. Which means I wish that UIVision skip this step and go to the COL3,etc.

  "Command": "type",
  "Target": "id=PageContent_DescriptionField",
  "Value": "${!COL2}"

I dont know how to edit XPath, but I suspect this is what I need to edit inside XPath/target “id=PageContent_DescriptionField”

Here is part of the full code, wthou XPath edited, could you help me please to edit only this part? This way I can edit all the rest, just replacing, using your code. Thanks.

{
“Name”: “Update but Ignore Blank Column”,
“CreationDate”: “2020-11-24”,
“Commands”: [
{
“Command”: “csvRead”,
“Target”: “stations.csv”,
“Value”: “”
},
{
“Command”: “open”,
“Target”: “https://google.com/=${!COL1}”,
“Value”: “”
},
{
“Command”: “comment”,
“Target”: “skip blank description”,
“Value”: “”
},
{
“Command”: “if_v2”,
“Target”: “${!COL2}.length > 0”,
“Value”: “”
},
{
“Command”: “type”,
“Target”: “xpath=//input[@name=‘name’]”,
“Value”: “${!COL2}”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”
},
{
“Command”: “comment”,
“Target”: “skip blank description”,
“Value”: “”
},
{
“Command”: “type”,
“Target”: “id=PageContent_DescriptionField”,
“Value”: “${!COL2}”
},
{
“Command”: “type”,
“Target”: “id=PageContent_EngField”,
“Value”: “${!COL3}”
},

Here the macro code i already use it in my macro and working well.

This check value inside csv and do not use if are empy.

    {
      "Command": "if_v2",
      "Target": "${!COL2}.length > 0",
      "Value": ""
    },
    {
      "Command": "type",
      "Target": "id=PageContent_DescriptionField",
      "Value": "${!COL2}"
    },
    {
      "Command": "end",
      "Target": "",
      "Value": ""
    },

Man!!! You’re genius!!! You saved my life!
Thank you very much! So glad that I live in the world with people like you!

Have a wonderful day!

Click solution button in my post with macro code please

Thanks

done, thanks! :grin:

1 Like