Skip to content

A Mobile Sync Rule's initial-query XML, using an inline expression like `@expression[now()+days(-30)]` directly as a constraint's value to filter to roughly the last 30 days, fails during mobile device initialization with 'String was not recognized as a valid DateTime.'

Answer

That inline dynamic-expression syntax isn't reliably supported as a direct constraint value in a Sync Rule's initial-query XML. Instead, add a computed/derived column, a 'user-defined' field, to the underlying view used by the sync rule that itself computes the relevant rolling date value using the equivalent SQL expression, and reference that computed column's name directly as the constraint's right-operand in the sync rule's XML, rather than trying to embed the dynamic expression inline in the rule itself.

← Browse Mobile and service touch apps (MWO/MRO) questions