Clarity

Expand all | Collapse all

Where from does the value on create come from?

Andrew M

Andrew MMar 24, 2017 12:54 PM

  • 1.  Where from does the value on create come from?

    Posted Mar 24, 2017 05:21 AM

    We have this custom object and a custom attribute in it.

    In the GUI in Administration there is a default.

    When we try to change or delete the default the current value is returned after save.

     

    When we create a new instance the field is populated with something else.

     

    There is no process we can relate either behaviour to.

    In the database the field does not have a default in odf_custom_attributes

    There is a trigger for auditing the object and that attribute.

     

    Have not done a trace yet.

     

    Where else could we look for the reason not being to set a new default and the new instance being populated with something other than the default?



  • 2.  Re: Where from does the value on create come from?

    Posted Mar 24, 2017 05:25 AM

    Theres a default at attribute level and at fields level (the 'fields' one can override the 'attribute' one)?

    You should of course be able to change the default(s) though - sounds weird. 



  • 3.  Re: Where from does the value on create come from?

    Posted Mar 24, 2017 05:57 AM

    Thanks  Dave_3.0 where would I find the attribute default in the db.

    yes is sounds weird until the logic is found.



  • 4.  Re: Where from does the value on create come from?

    Posted Mar 24, 2017 06:03 AM

    Just wondering why the system did consider your post as a reply, but it did consider mine above.



  • 5.  Re: Where from does the value on create come from?

    Posted Mar 24, 2017 06:21 AM

    cmn_attributes.default_value - will look 'odd' for lookup values though

    ( and no idea why my "replies" are not counted - should I take that personally  )



  • 6.  Re: Where from does the value on create come from?

    Posted Mar 24, 2017 08:05 AM

    It is a custom attribute apparently from a custom object in a content package so there are no records for the table or the attribute in question in cmn_attributes

    There is a record in cmn_attributes, but the default value field is blank.

    At least your second post is counted, so all is not lost.



  • 7.  Re: Where from does the value on create come from?

    Posted Mar 24, 2017 08:09 AM

    ODF_CUSTOM_ATTRIBUTES.DEFAULT_VALUE perhaps?

     

    View overrides might be the one in ODF_VIEW_ATTRIBUTES.DEFAULT_VALUE as well.

     

    ( Oracle DB ;

    select table_name , column_name
    from all_tab_columns
    where column_name = 'DEFAULT_VALUE'

    and owner = 'NIKU' )



  • 8.  Re: Where from does the value on create come from?

    Posted Mar 24, 2017 08:35 AM

    Thanks again.

    The default value displayed in Administration Object attributes is the same as in ODF_CUSTOM_ATTRIBUTES.DEFAULT_VALUE 

     

    No records for the table where the attributes are in all_tab_columns.

     

    I was trying to see if there is a process by opening the initiated processes and sorting descending by the start date and then clicking new on the object list. No new process was started. On the other hand the default in that field was not what it had been for a month but the the default set in Administration. Maybe somebody else is playing with it at the same time.



  • 9.  Re: Where from does the value on create come from?

    Posted Mar 24, 2017 12:54 PM

    Do you have partitions?



  • 10.  Re: Where from does the value on create come from?

    Posted Mar 24, 2017 03:54 PM

    There are partitions, but I cannot  any for the attributes or views and the partition in the db is root.



  • 11.  Re: Where from does the value on create come from?

    Posted Mar 27, 2017 02:13 AM

    Hi,

     

    Check if ODF_DEFAULT_OVERRIDES table has an entry for this attribute.



  • 12.  Re: Where from does the value on create come from?

    Posted Mar 27, 2017 02:34 AM

    Thanks Jeevan.B  there is, but it is the same as I see as the attribute default in Administration > Studio > Objects

     

    This morning when creating a new instance I see again the unwanted untraceable default.



  • 13.  Re: Where from does the value on create come from?

    Posted Mar 27, 2017 02:45 AM

    Sorry, I might have missed out on this part. But, is the scenario like this:

    1. You have a default in Administration -> Studio -> <Specific> Object -> <Specific> Attribute(Lets call this attribute A1)

    2. You change the default on this A1, from what is currently there, say V1, to V2. You Save. But the default changes back to V1 as soon as you save?

     

    Or is the scenario that:

    1. There is a value V2 on A1 defined in Administration -> Studio -> <Specific> Object -> <Specific> Attribute

    2. But you keep getting value V1, when you create new instances.. 



  • 14.  Re: Where from does the value on create come from?

    Posted Mar 27, 2017 03:28 AM

    Thanks, it is somewhat similar:

    The first scenario applies: When we try to change the default we get V1 back after save.

     

    When we create a new instance the value is different from V1 and we have not located where from it comes.



  • 15.  Re: Where from does the value on create come from?

    Posted Mar 27, 2017 03:44 AM

    Thanks for that clarification.

     

    Deleting the record from ODF_DEFAULT_OVERRIDES will fix the first scenario. See if that helps the second one as well.

     

    This KB gives more explanation: https://www.ca.com/us/services-support/ca-support/ca-support-online/knowledge-base-articles.TEC1076808.html 



  • 16.  Re: Where from does the value on create come from?

    Posted Mar 27, 2017 04:17 AM

    Thanks, I'll pass that on to the guys doing hands on troubleshooting on it.



  • 17.  Re: Where from does the value on create come from?

    Posted Mar 28, 2017 12:23 PM

    In the properties views, view attribute properties there is override default.

    Still wondering where that is stored in the database as it was not in ODF_DEFAULT_OVERRIDES?



  • 18.  Re: Where from does the value on create come from?

    Posted Mar 29, 2017 04:11 AM

    urmas wrote:

     

    Still wondering where that is stored in the database as it was not in ODF_DEFAULT_OVERRIDES?

    In my system, the Fields/Override Default is in the ODF_VIEW_ATTRIBUTES.DEFAULT_VALUE - don't recognise "odf_default_overrides"?

     

    --

     

    Simple test;

     

    I create a new attribute and give it an attribute level "Default Value" of "AttrDefault" - this is stored in ODF_CUSTOM_ATTRIBUTES;

    select column_name , default_value
    from Odf_Custom_Attributes
    where Column_Name = 'myattribute'

    COLUMN_NAMEDEFAULT_VALUE
    myattributeAttrDefault

    Creating a new instance of my object gives a default in "MyAttribute" of "AttrDefault".

     

    Looking in ODF_VIEW_ATTRIBUTES now;

    select attribute_code , view_id, default_value
    from ODF_VIEW_ATTRIBUTES
    where attribute_code = 'myattribute'
    ATTRIBUTE_CODEVIEW_IDDEFAULT_VALUE
    myattribute5065033
    myattribute5065034
    myattribute5065037

     

     

    Then I go into the [FIELDS] settings for my attribute and enter an "Override Default Value" of "ViewDef".

     

    Run that last query again and now I see;

    ATTRIBUTE_CODEVIEW_IDDEFAULT_VALUE
    myattribute5065033ViewDef
    myattribute5065034ViewDef
    myattribute5065037

     

    Creating a new instance of my object gives a default in "MyAttribute" of "ViewDef".



  • 19.  Re: Where from does the value on create come from?

    Posted Apr 03, 2017 08:23 AM

    Thanks  Dave_3.0 

    I do see the ODF_DEFAULT_OVERRIDES in both MS SQL and Oracle

    When I create an attribute Override Test and give it a default value This the default

    I do see it in ODF_CUSTOM_ATTRIBUTES

    but not in ODF_DEFAULT_OVERRIDES

    If I run your query I see the override in ODF_VIEW_ATTRIBUTES

     

    but I think that is the result and gives the views where the default is applied

    I should expect to find one table where there is a single record where the default override value is given and not a list of all the views where it is applied.



  • 20.  Re: Where from does the value on create come from?

    Posted Apr 03, 2017 08:36 AM

    urmas wrote:

     

     

    I should expect to find one table where there is a single record where the default override value is given and not a list of all the views where it is applied.

    You are doing;

    urmas wrote:

     

     

    When I create an attribute Override Test and give it a default value This the default

    I do see it in ODF_CUSTOM_ATTRIBUTES

     



  • 21.  Re: Where from does the value on create come from?

    Posted Apr 04, 2017 04:18 AM

    If I do, please educate me.

    I do see the attribute default

    but what I am after the is the override of the default which is the view field default override

    Where could I see that?



  • 22.  Re: Where from does the value on create come from?
    Best Answer

    Posted Apr 04, 2017 05:02 AM

    "This is the default" should be in ODF_CUSTOM_ATTRIBUTES

    "This is the override" is in ODF_VIEW_ATTRIBUTES (multiple records for multiple views)



  • 23.  Re: Where from does the value on create come from?

    Posted Apr 04, 2017 05:08 AM

    Are you saying the when I write and save the value in Override Default value that does not go to a single record and field in table in the database, but creates a undefined number (in this particular case) or records in that table?

    As said I should expect that value first to go one record only and then from there to other records in other tables.



  • 24.  Re: Where from does the value on create come from?

    Posted Apr 04, 2017 08:09 AM

    ^ yes ; in that there are often multiple views - one "Fields" entry covering object-create and object-edit for example.



  • 25.  Re: Where from does the value on create come from?

    Posted Apr 09, 2017 03:13 PM

    Thanks Dave_3.0 

    Verified it with a database search.

    When I go to view fields and display all and enter the 'This is the override'

    there is one record created in ODF_VIEW_ATTRIBUTES.

    Apparently when I put that field in a view it then creates more records for the default edit and properties views which I was seeing in that table earlier.