Skip to main content

Currently I have a fairly simple list consisting of 4 columns, the 2 important ones here are "Month" and "Year".  These are both "Single line of text" in SharePoint as this data is validated then passed to a SQL stored procedure.  I have changed the item on the form to be a Choice and selected it to be a dropdown to avoid user errors later (and to make it easier for the end users on mobile devices).

When I'm on the desktop version of the form the following works perfectly "fn-FormatDate(Current Date, "MMMM").  This then selects the option of May as the default selected option.  This also works the same for the Year except with "yyyy" and 2016 is selected as default from the options in the dropdown list.

When on the Nintex iPad App I get "Control has one or more invalid inline functions".  Upon testing, if I changed 'Current Date' to 25/05/2016 then it works perfectly, May is set to the default.  If I create a separate item for testing and set the default value to 'Current Date' it is returning 2016/05/25.  This is where the problem seems to be occurring as 'Current Date' is providing the function with the date backwards (yyyy/mm/dd instead of dd/mm/yyyy).  I created the same item on the desktop form and it is returning dd/mm/yyyy which I assume is why it is working there.

I've checked all regional settings are UK standard, the iPad is setup to be English UK and not anywhere does US appear in any of the regional settings.  How can I get the date in the formula to be dd/mm/yyyy so I can then get it to display this month and year?

This only works on the desktop form:

185239_pastedImage_0.png

This works on both the desktop form and the iPad app:

185240_pastedImage_1.png

Using Nintex 2010.  My first question on a forum, hopefully its got everything needed to help me out and its posted in the right place!

Hey Chris Beck​ – Given that your second screenshot works on both the iPad and desktop versions of your form, I would recommend utilizing the fn-FormatDate() function twice.

In your current Default value property, you have an assumption of a specific format coming across from the Current Date value. If you instead execute the fn-FormatDate() function on Current Date and then use the same function to get your defaulted month you should be good to go.

If you need a hand on the syntax, Andrew Glasser​ created a great resource for that: Date and Time Format Strings - Quick Reference Guide

Good luck!

Patrick


Thank you for your response.  Unfortunately putting in fn-FormatDate(Current Date,"MMMM") fails on the iPad which is why I'm having this problem. 

For testing what I did was to create a single line text box and set the default value to 'Current Date'.  When I display this on the iPad the default value shows YYYYMMDD but if I view the exact same item on the desktop the date is displayed as DDMMYYYY.  My assumption is that the fn-FormatDate is failing on the iPad as the date format from 'Current Date' is incorrect.


Just wondering if anyone else has any ideas on how I can achieve this?


I've found that I can use the function just fine as long as the date to format is not a reference, like current date. This may be a bug and I would let Nintex Support​ know. I tested this on Nintex Mobile Forms for the iPhone.

fn-formatDate({Common:CurrentDate}, "MMMM") - fails with error on form

fn-formatDate("{Common:CurrentDate}", "MMMM") - fails with error on form

fn-FormatDate("6/18/2015","MMMM") - works find on NMF


I've just found this same issue on Android. Seems it was either never reported or never fixed.

I've contacted support to find inform them.

Anyone got this working or is it a confirmed bug?


I've just tried this again and it appears to be working fine on iOS, I gave up previously and just let the users change it manually.  I've recently updated to the latest build on the server (Workflow 2.5.3.0 and Forms 1.12.1.0) and I'm running version version 4.4.2 on the iPad.  I'm afraid I have no android devices to test this with but maybe it will help you.


O365 for me, so maybe that's a difference as well.


Reply