Fields

If you want a date field that always updates (or at least as often as defined by the system variable FIELDEVAL), use a DIESEL expression. (DIESEL stands for Direct Interpretively Evaluated String Expression Language).

Here is an example that will give you the full month, spelled out and the four digit year, in uppercase.

$(upper,$(edtime, 0, MONTH YYYY))

Which will give you this:

The DIESEL function "edtime" allows for almost any date string you might need. In addition to the DIESEL reference, see this for more info also. Read more about Date Field that updates

Tags: 

There does not seem to be an option for changing text portions of dates (such as the name of the month) to UPPERCASE (or lowercase) using the Field command dialog box. All of the examples shown are in First capital.

Field dialog box

However, if you explore other fields where there are options to change the case, you can see that setting a field to UPPERCASE simply adds some code to the end of the field like this: "%tc1".   Read more about Changing the case of date fields

In the last post, we added some math formulas to numeric fields, but pointed out that this does not work with traditional Date fields. So what are we doing here? There is a different method that you can use that will allow you to do this.

Instead of using a Date field, we are going to use a DIESEL expression. If that sounds strange, don't fear. I will not cover intricate details regarding DIESEL functions and you will not need it for this tutorial. Read more about Using Math with Date Fields

Here is a little tip on using math in fields that reference other fields. How could this help you? Let's look at an example where we will create a field that shows us 1/3 of the length of a line. Read more about Using Math with Fields

Here is one way to create a field linked to an object. For example, this could be used if you wanted to write your own program to label the area of closed polylines, but you want to use a dynamic field instead of a static TEXT entity. Here is a code example... Read more about Create a field linked to an object

When using dates in FIELDS, you probably either want the date to remain static until you manually update it, or update automatically like other fields. If you use the DATE field name, then the date string will remain static until you manually update it using the UDPATEFIELD command. If you want a FIELD that includes a date that automatically updates, you can use the following DIESEL string in your field.

$(edtime, 0, MON DD"," YYYY-H:MM:SS am/pm)

Here is a reference to "edtime" and all of the other DIESEL functions.

Remember that the value of FIELDEVAL determines what events trigger the automatic field updates. Read more about Using Dates in FIELDS

 


All content is copyright © CAD PANACEA 2005-2013 unless otherwise noted and may not be reproduced. All comments posted to this blog are the sole responsibility of the person making the comment.

Google, as a third party vendor, uses cookies to serve ads on this site. Google's use of their cookies enables it to serve ads to users based on their visit to your sites and other sites on the Internet. You may opt out of the use of these cookies by visiting the Google ad and content network privacy policy.

Powered by Drupal