-
Sorry, yeah, that is just going to return true and false. So - are there multiple rows in both data sources? Because if so, you'll always get the first coupon code from the random date data source....
-
If you want to see if there is no match in "random date" based on Loan_x0020_number equaling LOans, I'd try:
not(xdXDocument:GetDOM("random date")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Loan_x0020_number[. = ...
-
Sorry - I don't have a SharePoint on-prem 2016 install to test with. Hopefully someone else will have run into this before....
-
You can use XPath to check and see if an item from one data source is present in another data source, sure. Perhaps if you attach your template on a reply (under the options tab) I'll better understand what you are trying to do.
-
I'm not sure how you are going to get a random item without some kind of logic to create a pseudo-random number.
-
Is there a complex filter here that requires you to use REST instead of a normal list connection with query fields? Have you verified anon access is disabled for SharePoint in IIS as per the replies here: https://www.infopathdev.com/forums/p/39193/123489.aspx#123489
-
So - here is a rough sample that uses the last three digits of the date time and the count of the "coupons" in my XML file to randomly select one. Save the file locally, right click and select design, then you can preview.
-
Looking at the other thread referenced, it sounds like anon access was disabled in IIS and it started working? But I'm not sure.
-
I'd probably base this on the result of the now() function somehow. It returns data/time to the second. Perhaps grab the last two characters returned and add them, then have an XML file in your form that associates codes to numbers..... How many codes do you have?
-
Okay, so I tried this approach:
$xml = New-Object System.Xml.XmlDocument
$xml.PreserveWhitespace = $false
$xml.Load("C:\Users\Hilary Stoupa\Documents\~Temp\2020-09-22T09_02_19.xml")
$xml.PreserveWhitespace = $true
$xml.Save("C:\Users\Hilary Stoupa\Documents\~Temp\TST2020-09-22T09_02_19.xml") ...