Something went wrong while trying to load the full version of this site. Try hard-refreshing this page to fix the error.

How to format display of Input Control ??

gernotlg

I can't seem to find a way to format the display of an input control... namely a Date value.

The Input control is in the Top Bar of a VP.

If I set the format of the attribute that it is tied to (CurrentSession.SelectedDate) to dd/MM/yyyy then 3 things happen...

  1. The initial value of CurrentSession.SelectedDate (which is CURRENT_DATE) does not get displayed (when current day is > 12), or displays as MM/dd/yyyy
  2. The date displayed in the input control (after selecting from the date picker) is still MM/dd/yyyy.
  3. The query results are muddled up and the returned values are wrong as per example...
    ---- If I selected 8th June 2021 from date picker...
    -------- the displayed value in the input control will be 06/08/2021 = MM/dd/yyyy.
    -------- the query results will be for 6th August 2021 (06/08/2021 = dd/MM/yyyy .. which is the format of the attribute in session object)

So, this suggests that the date picker is putting the date value into the input control, which is displaying as MM/dd/yyyy, then this value must be getting sent to the session object as text(??) instead of as a date value, because when it ends up in the session object (which is formatted as dd/MM/yyyy) it has mixed up the day and the month.

This looks like a bug to me.

But I would probably be able to overcome this, if I could format the Input Control as dd/MM/yyyy.

Any suggestions ?

Thanks
G


Jaymer

I use DATE fields in Top Bar with success.
Most likely a bug dealing with the diff formatting.
You could call a process when it changes and via DISPLAY MESSAGE or some display on a form try to see what value is really in there. No need for conversion to/from PlaintText field in my opinion.


gernotlg

Thanks Jaymer, but I can already see what the value is... the value of the Input control is, when I click on the calender button which is part of the control, (highlighted in yellow), and the value passed to the query is day and month swapped around.

Screenshot 2023-01-30 120635.jpg

Screenshot 2023-01-30 120712.jpg

That bug aside... how would I format the Input Control to display dd/MM/yyyy ?


Jaymer

set the format of that attribute in your NP session BO.