
Announcements
I am trying to assign PDF invoices to specific suppliers when they are saved into a SharePoint document library.
I am extracting the text from the PDF file (using the 'Recognize text in an image or a PDF document' action). The output text string contains a postcode relating to one of my suppliers. The text string is output into a string variable ('varText').
I have a separate SharePoint 'Suppliers' list which has a field called 'Postcode'. What I want to do is use a 'Get items' action on 'Suppliers' to find the item where the Postcode matches the one found in 'varText'.
I have seen several examples of the 'contains' function but have not been able to find one that matches my requirement. Does anyone have an idea if this is possible and how it can be done?
I have managed to get this to work by not filtering the 'Get items' step and instead adding a 'Condition' step after it. I can use the 'contains' function built into that to act upon records where 'varText' contains 'Postcode'. If that returns 'true' then I can use 'Get item' to get the matching supplier item from 'Suppliers'. Even though it still cycles through all suppliers within the apply to each, I have a small amount so it is manageable and serves its purpose.