Default List Values

Hello,

I'm stuck on something that seems like it should be easy.  I'm have a lot of data entry to do and I wanted to set the accession field (object_status_id) to default to 'accessioned'.  In the Object lot status values (object_lot_statuses) list, I selected 'accessioned' and set the default flag to yes.  The value shows as the default in the list of items.  However, when I load the date entry interface, it doesn't default to 'accessioned'.  Instead it shows as '- NONE -T'.

This is happening with the acquisition method date element and also a custom data element using a custom list.  However, it works fine for other data elements that use a valie list including Status.  I just can't figure out what's different between these two element.

Thanks so much for all your help.  You guys have been great about responding to questions.

Charles

Comments

  • Hi Davidson,

    Have you checked to see that your list item 'none' is set to default:no?

    Also, to be clear, are you creating new records or editing existing ones?  Is it possible that you had previously saved a record, setting the values as 'none,' even though you did not intend to?
  • Hi,


    I am creating new records. There is no value in the list called "none", so I cannot set the default value to "no".  In custom elements, we have the ability to set a 'No value text" when the value is not required. I believe this is where "none" is coming from. However, status element is an intrinsic element and I do not have the ability to change this.

    Thanks.

  • Another note ...

    I removed the value in the element field "No value text" for a custom element.  The default item option now works for custom elements only.  That doesn't fix the fact that I can't set a default for a value list where "No value text" is set because I cannot edit intrinsic data elements directly from the interface.

    Thanks,
  • edited June 2015
    The -NONE- "value" appears as pseudo-default when you use the list using a custom "List" element and the "requireValue" setting is set to 0/No. It's not actually a value, just a placeholder. If you want it to require a value, set that setting to 1/Yes.

    It should never appear for the lot_status_id intrinsic field, however. That field always requires a value if placed in a UI.
  • Hello,

    I believe I understand completely what you are saying.  I don't think it works as advertised.  Take a look at my screenshots.  In the first, I have set the default object_status value to be "accessioned".  On my interface, I have the accession status bundle (item_status_id).  But when I add a new item, the field defaults to "NONE".

    Following your comments above, I shouldn't see "NONE' as an option if an intrinsic field always requires a value when placed in a UI.  There is also no place for me to made any "requireValue" settings for an intrinsic field.

    Hope that explains it.  I've tried double checking everything again.

    Charles

    490 x 217 - 29K
    296 x 221 - 14K
  • edited June 2015
    A-ha! I thought you were talking about lot_status_id for object lots! (because you mentioned the object_lot_statuses list in your first post)

    Yes, ca_objects.item_status_id (which is what you're looking at) can indeed be NULL. ca_object_lots.lot_status_id can't. Don't ask me why :-)

    So yeah, there's basically no way for you to get rid of that -NONE- option. You can always make a custom List element that references that same list though, and then set requireValue to 1 for that element.
  • Thanks for the response.  I don't necessarily need for the -NONE- option to disappear.  But I want to set a default value for the field while I am doing a ton of data entry.  Even though I set the default in the list, it doesn't actually make a difference in this case.  Is that by design?  It seems strange.
  • This problem (default list value doesn't show up in the object editor) seems to persist. I just had the same problem with source_id (= object_sources list). Any possibility to make the "NONE" value disappear and the default value show up?

Sign In or Register to comment.