Hello @Tom1989 dare I ask are you still looking for some advice?
Due to the complexity, I don’t know how much help I can provide, but I’ll give some tips.
First, you need to extract the fields from the PDF. This might be the most challenging. To be honest, I can’t help identify the best approach to this, because it depends on the structure of the PDF file. But if we assume you need to use the Read PDF to extract all the text from the file, then I can help you with Regex or String manipulation to pull in the various fields that you need, which in that case I would need to see the RAW text data that you extracted from the Read PDF.
So, that’s the challenge is extracting the fields from the PDF text.
You say they are in 2 formats, well you can identify which format by using a Regex pattern, then proceed to extracting the fields on the format that was identified. But like I said, we need to see the RAW text from the PDF file or an example of it anyway. Alternatively, if the PDF is structured a certain way, you might not need to do any of this, if Data Scraping works; it depends on the PDF file though.
So, by using a Regex pattern, you can determine which format it is under, then have 2 other Regex patterns to extract the text for each format or you can also use the .Split method instead of Regex.
After you have all the fields correctly stored in variables, then comes (what should be) the easy part. You can simply replace all spaces and specials with a wildcard for use in the selector. See @RishiVC1’s link to doing this.
From my understanding, this pseudocode might look like this:
Read PDF file
Identify which Format // If Regex.Match(text, format1Pattern).Success, If Regex.Match(text, format2Pattern).Success
Assign each field based on the format
Navigate website and input fields while replacing spaces and specials only for the sites that require the item in the selector
Lastly, make sure you are trying the Select Item activity rather than the Click + Click selector method, because the Select Item will change how you input the field dynamically so depends on the website.
Hope that helps in some way.