Clarity

 View Only
  • 1.  Xog in of inactive lookup value

    Posted Jul 07, 2020 05:48 AM
    Hi All,

    I have Dynamic lookup attribute in Projects which excludes deactivated application values in the lookup while browsing. While mapping the deactivated Applications still shows up in the field. All this is fine and working as expected. However while xogging this Project back into a Demand the Deactivated lookup value doesn't get xogged since it is excluded in the lookup. The xog doesn't update that value . I would like to know if there is any way we could still update the deactivated(excluded) value of the dynamic lookup?

    Any suggestions please??

    Regards
    Vinay


  • 2.  RE: Xog in of inactive lookup value

    Posted Jul 07, 2020 06:15 AM
    Pretty sure that when I had this problem in a GEL-script process, I had to reactivate the inactive value in the lookup (via XOG), then run my main XOG then de-activate the value again in the lookup (via XOG). Messy.


  • 3.  RE: Xog in of inactive lookup value

    Posted Jul 07, 2020 06:24 AM
    Is it system functiionality or it has something to do with our dynamic lookup?


  • 4.  RE: Xog in of inactive lookup value

    Posted Jul 07, 2020 06:36 AM
    Edited by David Morton Jul 07, 2020 06:38 AM
    I would think it is "expected behaviour" - the interface (whether it is the user-interface or XOG) is preventing you from creating an invalid value in the application.

    I missed the point you made about it being a dynamic lookup, my example was with a fixed list of values and I always knew the values that would be inactive so I could (relatively easily) construct the XOG to re-activate and then de-activate the lookup values. For you case with a dynamic lookup you are probably not going to be able to do this, so I would argue that the application is doing the right thing in uploading the data and just ignoring that value - perhaps if it was very important to you to retain that de-activated value then you should just de-activate the data rather than remove it (I mean in the underlying source of your dynamic lookup**) or maybe load the value into a field with no validation. No simple answer though I think.

    ( ** so yes if you could rewrite your dynamic lookup so it still presented the deactivated data in the lookup then the XOG would work - you might be able to use the "BROWSE ONLY" NSQL construct to help you there but I have a feeling that that is only useful in the way that UI works rather than with creating data via XOG)


  • 5.  RE: Xog in of inactive lookup value

    Posted Jul 07, 2020 06:52 AM
    The data is existing in the staging table and we have excluded the deactivated data in the lookup as part of business logic so that it wont show that deactivated data when we browse however it shows when a mapping is done through database query. Wouls like to know how xog works with this kind of data??


  • 6.  RE: Xog in of inactive lookup value
    Best Answer

    Posted Jul 07, 2020 06:59 AM
    To my mind, the XOG is just reflecting the rules you have set up ; you have the object saying "this attribute may only contain values in this lookup" and XOG is just respecting that in the same way that the user-interface would (we can not enter data in the UI into a lookup field that the lookup does not support).

    If you need the XOG to set a value, then that value must be returned by the lookup.

    If you are just updating an existing record via XOG (it sounds like you are) then just remove that field from the XML in the XOG and it would be unaffected.