Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Post Brexit UK VAT ID Validation

mahadevaswab
8 - Asteroid

Dear All,

 

Do we have any workflows to validate the VAT ID pertains to UK using below website.

 

https://www.tax.service.gov.uk/check-vat-number/known

 

as this was previously used to validate the status of VAT ID in VIES web portal.

 

Regards

Mahadeva Swamy

22 REPLIES 22
Kingazawora
8 - Asteroid

Hi All

 

Why the VIES ID check could not be used? The workflow above does not work for me at all...

 

Thanks, Kinga

BrandonB
Alteryx
Alteryx

@mahadevaswab are you sure that you are using the right chromedriver? You can find the latest downloads at: https://sites.google.com/chromium.org/driver/downloads?authuser=0 

 

You need to make sure that the chromedriver you download is the windows version AND that it corresponds with the version of Google Chrome that you are using. 

 

 

BrandonB
Alteryx
Alteryx

@Kingazawora the workflow is attached to an above post. When configured correctly and using the right chromedriver, it functions as expected. I just ran it again this morning: 

 

UK VAT.png

mahadevaswab
8 - Asteroid

Hi @BrandonB Yes, I did download the Chrome driver for my version but only doubt is in the Chromedriver I have 32bit for windows where as the installed chrome is 64 bit.

 

I am not sure if the issue because of this

BrandonB
Alteryx
Alteryx

The 32 bit should be fine. The error message I am seeing in your Python results is "PermissionError: [WinError 5] Access is denied"

 

Maybe as a test try moving the chromedriver.exe to your desktop and then change the path in the Python to point to that location. 

TheOC
15 - Aurora
15 - Aurora

just dropping in to say that's an awesome solution @BrandonB . Big fan of the python tool being used in workflows, and Selenium is definitely the next thing for me to learn on that avenue!

 

Also, Yeah it may require pointing at the chromedriver specifically in the code, i've had a similar issue in the past.

cheers!
TheOC


Bulien
mahadevaswab
8 - Asteroid

@BrandonB please advise on the below error ( Attached image for reference)

 

Error: Python (7): File "<ipython-input-2-244e596ffded>", line 2
wd = webdriver.Chrome("C:\Users\mahadevaswab\Desktop\Alteryx\chromedriver")
^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

Python error.png

TheOC
15 - Aurora
15 - Aurora

hey @mahadevaswab 

That issue is because it is trying to use a normal string as a path, and so the '\' is causing issues. There are 3 potential solutions to this:

1. (r"C:\Users\path\to\file) - place an r just before the string to convert it to a raw string

2. (r"C:\\Users\\path\\to\\file) - change to double slashed

3. (r"C:/Users/path/to/file)  - change to forward slashes

 

 

Hope this helps! 
TheOC


Bulien
DavidSta
Alteryx
Alteryx

Hi All,

 

as there seems to be a problem to get the Python from Brandon running together with Selenium I took a look on how to "natively" integrate it with the Download Tool.

 

I created a Batch Macro where you can feed in a List of VAT Numbers. The number has to be a 9 or 12 digits number. You can find a sample Workflow with the Batch Macro attached.

 

DavidSta_0-1621273891482.png

 

The API Documentation can be found here: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/vat-registered-companies-ap...

Kingazawora
8 - Asteroid

Great!

 

What version of Alteryx do you use?

 

Thanks, Kinga

Labels