How do you get, and manipulate data from a non-text field? Specifically, I want to take the value in a field of type date, and populate another field with the month of the date that the user has entered. uidoc.fieldgettext will give me an error.
Subject: How to get data from non-text field
In the user interface all fields are text, except Rich Text fields. If you get the value from the in-memory document, you can get the appropriate data type. For example, you can write something like:With uidoc.Document
If IsDate( .MyDateField(0)) Then .MyMonthField = Month( .MyDateField(0))
End With
Subject: How to get data from non-text field
Are you absolutely positive that’s where your error is? Fieldgettext should work with every field type, converting the contents of the field into a string. Perhaps you’re using Fieldgettext and trying to stuff the value it produces into a date/time variable or NotesDateTime object?
At any rate, once you’ve got an expression that represents a date/time, you can use the cdat function to turn it into a date, then the Month function to get the month.