Automaticfieldchoices needs an empty option


#1

The automaticfieldchoices statement is a brilliant addition to the collection but it needs to include (perhaps as an option) an empty choice so the user can enter a value which is not currently on the list of choices. At present, the only way to do this is is to copy it from somewhere and paste it.


#2

In Panorama 6, this works by adding underscores to the list of choices, and I think this works for X as well.


#3

That’s fine if you enter the choices manually but the ``automaticfieldchoices` statement doesn’t give you that option.


#4

There is probably some way to edit the choices in a procedure after you have generated the list. I looked at it in a Panorama X file that has choices, but it crashed when I had the field properties open and tried to open Help.


#5

You can indeed edit the Choices list after creating it with the automaticfieldchoices statement but the beauty of the statement is that you just stick it in a procedure and you don’t ever have to access the Object Properties content again. That’s why it would be good if it finished the job off.


#6

Whoops! make that the Object Inspector Panel :slight_smile:


#7

Well, after all that debate, I did a bit of research that I should have done at the beginning and it seems that the empty option at the end no longer exists (at least, the Help wizard makes no mention of it).

Is there a better way to add a new value other than pasting?


#8

Yes, it looks like that is so. You can use the underscore to have the option of changing a choice to be empty, but it looks like you cannot specify a value. You could, of course, have “Other” and open a dialog to specify something, but that is rather complicated. It would be a worthwhile addition, though.


#9

There is a way, but it is not faster: Change the Editor Mode of that Choices field (temporarily) to Text Editor instead of Automatic .


#10

It probably is faster and it can be done without moving from the initial window. Good one Kurt.