Hi - thanks for responding.
I've tried that just now, and yes it returns the value I expected.
Worth noting that the error happens as I'm building the formula, rather than it simply not giving me what I want/expect at runtime.
Could it be related to the data type of the field? It's set in SharePoint as a date field, and within Infopath using just an expression box it gives the full date-and-time format, ie '2012-11-15T00:00:00' - could it be the inclusion of the time that's making it fail?
I'm thinking not, because if I just run addDays on the field without a filter, it correctly adds my 30 days.
Interestingly, elsewhere on the same form I am doing something similar - and it works! In other other scenario the key difference seems to be that I'm filtering based on the content of a local field in my form. So basically it;s like:-
addDays(ExternalDateField[NameField = LocalFormField]) --------and that works just fine. However if instead of comparing it to the content of a field I just put a text value of "Joe Bloggs", it brings back the afore-mentioned error.
I can usually figure out a workaround to things like this, but in this case I'm not sure if I'm dealing with something I'm doing wrong or something Infopath isn't doing right!