Clarity

Expand all | Collapse all

Can  all the details including the ID and Value of dynamic lookup be retrieved using XOG API?

  • 1.  Can  all the details including the ID and Value of dynamic lookup be retrieved using XOG API?

    Posted 03-18-2019 03:39 AM

    Can  all the details including the ID and Value of dynamic lookup be retrieved using XOG API?

    From the existing XOG API, only the value of a dynamic lookup field can be retrieved along with NSQL, but the internal lookup value ID is not retrieved. 

     

    EXAMPLE : (See the texts in bold)

    This is what retrieved when querying for lookup details using lookuptypecode via XOG API :

     

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Header/>
    <soapenv:Body>
    <SessionID xmlns="http://www.niku.com/xog">5261280__B9F70614-0349-452C-80A8-90C0B47D6DF9</SessionID>
    <ReadContentPackResponse xmlns="http://www.niku.com/xog/Object">
    <NikuDataBus xsi:noNamespaceSchemaLocation="../xsd/nikuxog_contentPack.xsd">
    <Header externalSource="NIKU" version="15.2.0.213"/>
    <contentPack update="true">
    <lookups update="true">
    <dynamicLookup autoSuggestEnabled="true" autoSuggestMaxSuggestions="10" code="LOOKUP_PROJECT_PAGE_LAYOUT" displayAttributeName="name" hiddenAttributeName="id" objectCode="" sortAttributeName="name" sortDirection="asc" source="niku.com" status="active" update="true">
    <nls description="" languageCode="ca" name="Dissenys actius del projecte"/>
    <nls description="Seznam rozvržení aktivních projektů" languageCode="cs" name="Rozvržení aktivního projektu"/>
    <nls description="Liste over aktive projektlayouts" languageCode="da" name="Aktive projektlayouts"/>
    <nls description="Liste der aktiven Projektlayouts" languageCode="de" name="Aktive Projektlayouts"/>
    <nls description="List of active project layouts" languageCode="en" name="Active Project Layouts"/>
    <nls description="Lista de diseños activos del proyecto" languageCode="es" name="Diseños activos del proyecto"/>
    <nls description="Aktiivisten projektiasetteluiden luettelo" languageCode="fi" name="Aktiiviset projektiasettelut"/>
    <nls description="Liste des dispositions de projets actifs" languageCode="fr" name="Dispositions des projets actifs"/>
    <nls description="Aktív projektelrendezések listája" languageCode="hu" name="Aktív projektelrendezések"/>
    <nls description="Elenco layout progetti attivi" languageCode="it" name="Layout progetto attivo"/>
    <nls description="アクティブなプロジェクト レイアウトのリスト" languageCode="ja" name="アクティブなプロジェクト レイアウト"/>
    <nls description="[ko: List of active project layouts]" languageCode="ko" name="[ko: Active Project Layouts]"/>
    <nls description="Lijst met actieve projectlay-outs" languageCode="nl" name="Actieve projectlay-outs"/>
    <nls description="Liste over aktive prosjektoppsett" languageCode="no" name="Aktive prosjektoppsett"/>
    <nls description="Lista aktywnych układów projektu" languageCode="pl" name="Aktywne układy projektu"/>
    <nls description="Lista de layouts de projetos ativos" languageCode="pt" name="Layouts de projeto ativos"/>
    <nls description="Список активных разметок проекта" languageCode="ru" name="Планировки активных проектов"/>
    <nls description="Lista över aktiva projektlayouter" languageCode="sv" name="Aktiva projektlayouter"/>
    <nls description="Etkin proje düzenleri listesi" languageCode="tr" name="Etkin Proje Düzenleri"/>
    <nls description="活动项目布局列表" languageCode="zh" name="活动项目布局"/>
    <nls description="使用中專案配置清單" languageCode="zh_TW" name="使用中專案配置"/>
    <nsql databaseId="Niku" dbVendor="mssql">SELECT @SELECT:page.id:id@,
    @SELECT:c.name:name@,
    @SELECT:page.page_code:page_code@,
    @SELECT:page.page_type_code:page_type_code@,
    @SELECT:page.parent_page_id:parent_page_id@,
    @SELECT:page.template_page_id:template_page_id@,
    @SELECT:page.is_personalizable:is_personalizable@,
    @SELECT:page.principal_id:principal_id@,
    @SELECT:page.principal_type:principal_type@,
    @SELECT:page.layout_id:layout_id@,
    @SELECT:page.space_code:space_code@
    FROM cmn_pages page,
    cmn_captions_nls c
    WHERE @FILTER@
    AND page.principal_type = 'SYSTEM'
    AND (page.instance_type = 'SRM_PROJECTS')
    AND (page.page_type_code = 'page' or page.page_type_code = 'tabPage')
    AND c.pk_id = page.id
    AND c.language_code = @WHERE:PARAM:LANGUAGE@
    AND c.table_name = 'CMN_PAGES'</nsql>
    <nsql databaseId="Niku" dbVendor="oracle">SELECT @SELECT:page.id:id@,
    @SELECT:c.name:name@,
    @SELECT:page.page_code:page_code@,
    @SELECT:page.page_type_code:page_type_code@,
    @SELECT:page.parent_page_id:parent_page_id@,
    @SELECT:page.template_page_id:template_page_id@,
    @SELECT:page.is_personalizable:is_personalizable@,
    @SELECT:page.principal_id:principal_id@,
    @SELECT:page.principal_type:principal_type@,
    @SELECT:page.layout_id:layout_id@,
    @SELECT:page.space_code:space_code@
    FROM cmn_pages page,
    cmn_captions_nls c
    WHERE @FILTER@
    AND page.principal_type = 'SYSTEM'
    AND (page.instance_type = 'SRM_PROJECTS')
    AND (page.page_type_code = 'page' or page.page_type_code = 'tabPage')
    AND c.pk_id = page.id
    AND c.language_code = @WHERE:PARAM:LANGUAGE@
    AND c.table_name = 'CMN_PAGES'</nsql>
    <displayedSuggestionAttributes>
    <displayedSuggestionAttribute value="name"/>
    </displayedSuggestionAttributes>
    <searchedSuggestionAttributes>
    <searchedSuggestionAttribute value="name"/>
    </searchedSuggestionAttributes>
    <browsePage>
    <singleSelectPageTitles>
    <nls description="" languageCode="ca" name="Dissenys de pàgina"/>
    <nls description="Rozvržení stránek" languageCode="cs" name="Rozvržení stránek"/>
    <nls description="Sidelayout" languageCode="da" name="Sidelayout"/>
    <nls description="Seitenlayouts" languageCode="de" name="Seitenlayouts"/>
    <nls description="Page Layouts" languageCode="en" name="Page Layouts"/>
    <nls description="Diseños de página" languageCode="es" name="Diseños de página"/>
    <nls description="Sivuasettelut" languageCode="fi" name="Sivuasettelut"/>
    <nls description="Mises en page" languageCode="fr" name="Mises en page"/>
    <nls description="Oldalelrendezések" languageCode="hu" name="Oldalelrendezések"/>
    <nls description="Layout di pagina" languageCode="it" name="Layout di pagina"/>
    <nls description="ページ レイアウト" languageCode="ja" name="ページ レイアウト"/>
    <nls description="[ko: Page Layouts]" languageCode="ko" name="[ko: Page Layouts]"/>
    <nls description="Paginalay-outs" languageCode="nl" name="Paginalay-outs"/>
    <nls description="Sideoppsett" languageCode="no" name="Sideoppsett"/>
    <nls description="Układy strony" languageCode="pl" name="Układy strony"/>
    <nls description="Layouts da página" languageCode="pt" name="Layouts da página"/>
    <nls description="Разметки страниц" languageCode="ru" name="Разметки страниц"/>
    <nls description="Sidlayouter" languageCode="sv" name="Sidlayouter"/>
    <nls description="Sayfa Düzenleri" languageCode="tr" name="Sayfa Düzenleri"/>
    <nls description="页面布局" languageCode="zh" name="页面布局"/>
    <nls description="頁面配置" languageCode="zh_TW" name="頁面配置"/>
    </singleSelectPageTitles>
    <multiSelectPageTitles>
    <nls description="" languageCode="ca" name="Dissenys de pàgina"/>
    <nls description="Rozvržení stránek" languageCode="cs" name="Rozvržení stránek"/>
    <nls description="Sidelayout" languageCode="da" name="Sidelayout"/>
    <nls description="Seitenlayouts" languageCode="de" name="Seitenlayouts"/>
    <nls description="Page Layouts" languageCode="en" name="Page Layouts"/>
    <nls description="Diseños de página" languageCode="es" name="Diseños de página"/>
    <nls description="Sivuasettelut" languageCode="fi" name="Sivuasettelut"/>
    <nls description="Mises en page" languageCode="fr" name="Mises en page"/>
    <nls description="Oldalelrendezések" languageCode="hu" name="Oldalelrendezések"/>
    <nls description="Layout di pagina" languageCode="it" name="Layout di pagina"/>
    <nls description="ページ レイアウト" languageCode="ja" name="ページ レイアウト"/>
    <nls description="[ko: Page Layouts]" languageCode="ko" name="[ko: Page Layouts]"/>
    <nls description="Paginalay-outs" languageCode="nl" name="Paginalay-outs"/>
    <nls description="Sideoppsett" languageCode="no" name="Sideoppsett"/>
    <nls description="Układy strony" languageCode="pl" name="Układy strony"/>
    <nls description="Layouts da página" languageCode="pt" name="Layouts da página"/>
    <nls description="Разметки страниц" languageCode="ru" name="Разметки страниц"/>
    <nls description="Sidlayouter" languageCode="sv" name="Sidlayouter"/>
    <nls description="Sayfa Düzenleri" languageCode="tr" name="Sayfa Düzenleri"/>
    <nls description="页面布局" languageCode="zh" name="页面布局"/>
    <nls description="頁面配置" languageCode="zh_TW" name="頁面配置"/>
    </multiSelectPageTitles>
    <filter code="name" defaultValue="" order="1" widgetType="text">
    <nls description="" languageCode="ca" name="Nom del disseny"/>
    <nls description="Bez popisu" languageCode="cs" name="Název rozvržení"/>
    <nls description="Ingen beskrivelse" languageCode="da" name="Navn på layout"/>
    <nls description="Keine Beschreibung" languageCode="de" name="Layoutname"/>
    <nls description="No description" languageCode="en" name="Layout Name"/>
    <nls description="No existe ninguna descripción" languageCode="es" name="Nombre del diseño"/>
    <nls description="Ei kuvausta" languageCode="fi" name="Asettelun nimi"/>
    <nls description="Aucune description" languageCode="fr" name="Nom de la disposition"/>
    <nls description="Nincs leírás" languageCode="hu" name="Elrendezés neve"/>
    <nls description="Nessuna descrizione" languageCode="it" name="Nome layout"/>
    <nls description="説明がありません" languageCode="ja" name="レイアウト名"/>
    <nls description="[ko: No description]" languageCode="ko" name="[ko: Layout Name]"/>
    <nls description="Geen omschrijving" languageCode="nl" name="Naam lay-out"/>
    <nls description="Ingen beskrivelse" languageCode="no" name="Navn på oppsett"/>
    <nls description="Brak opisu" languageCode="pl" name="Nazwa układu"/>
    <nls description="Nenhuma descrição" languageCode="pt" name="Nome do layout"/>
    <nls description="Нет описания" languageCode="ru" name="Планировка: имя"/>
    <nls description="Ingen beskrivning" languageCode="sv" name="Layoutnamn"/>
    <nls description="Açıklama yok" languageCode="tr" name="Düzen Adı"/>
    <nls description="无说明" languageCode="zh" name="布局名称"/>
    <nls description="沒有說明" languageCode="zh_TW" name="配置名稱"/>
    </filter>
    <listColumn code="id" order="2" widgetType="hidden">
    <nls description="" languageCode="ca" name="ID"/>
    <nls description="Bez popisu" languageCode="cs" name="ID"/>
    <nls description="Ingen beskrivelse" languageCode="da" name="Id"/>
    <nls description="Keine Beschreibung" languageCode="de" name="ID"/>
    <nls description="No description" languageCode="en" name="ID"/>
    <nls description="No existe ninguna descripción" languageCode="es" name="ID"/>
    <nls description="Ei kuvausta" languageCode="fi" name="Tunnus"/>
    <nls description="Aucune description" languageCode="fr" name="ID"/>
    <nls description="Nincs leírás" languageCode="hu" name="Azonosító"/>
    <nls description="Nessuna descrizione" languageCode="it" name="ID"/>
    <nls description="説明がありません" languageCode="ja" name="ID"/>
    <nls description="[ko: No description]" languageCode="ko" name="[ko: ID]"/>
    <nls description="Geen omschrijving" languageCode="nl" name="ID"/>
    <nls description="Ingen beskrivelse" languageCode="no" name="ID"/>
    <nls description="Brak opisu" languageCode="pl" name="Identyfikator"/>
    <nls description="Nenhuma descrição" languageCode="pt" name="ID"/>
    <nls description="Нет описания" languageCode="ru" name="Код"/>
    <nls description="Ingen beskrivning" languageCode="sv" name="ID"/>
    <nls description="Açıklama yok" languageCode="tr" name="Kimlik"/>
    <nls description="无说明" languageCode="zh" name="ID"/>
    <nls description="沒有說明" languageCode="zh_TW" name="ID"/>
    </listColumn>
    <listColumn code="name" order="1" widgetType="text">
    <nls description="" languageCode="ca" name="Nom del disseny"/>
    <nls description="Bez popisu" languageCode="cs" name="Název rozvržení"/>
    <nls description="Ingen beskrivelse" languageCode="da" name="Navn på layout"/>
    <nls description="Keine Beschreibung" languageCode="de" name="Layoutname"/>
    <nls description="No description" languageCode="en" name="Layout Name"/>
    <nls description="No existe ninguna descripción" languageCode="es" name="Nombre del diseño"/>
    <nls description="Ei kuvausta" languageCode="fi" name="Asettelun nimi"/>
    <nls description="Aucune description" languageCode="fr" name="Nom de la disposition"/>
    <nls description="Nincs leírás" languageCode="hu" name="Elrendezés neve"/>
    <nls description="Nessuna descrizione" languageCode="it" name="Nome layout"/>
    <nls description="説明がありません" languageCode="ja" name="レイアウト名"/>
    <nls description="[ko: No description]" languageCode="ko" name="[ko: Layout Name]"/>
    <nls description="Geen omschrijving" languageCode="nl" name="Naam lay-out"/>
    <nls description="Ingen beskrivelse" languageCode="no" name="Navn på oppsett"/>
    <nls description="Brak opisu" languageCode="pl" name="Nazwa układu"/>
    <nls description="Nenhuma descrição" languageCode="pt" name="Nome do layout"/>
    <nls description="Нет описания" languageCode="ru" name="Планировка: имя"/>
    <nls description="Ingen beskrivning" languageCode="sv" name="Layoutnamn"/>
    <nls description="Açıklama yok" languageCode="tr" name="Düzen Adı"/>
    <nls description="无说明" languageCode="zh" name="布局名称"/>
    <nls description="沒有說明" languageCode="zh_TW" name="配置名稱"/>
    </listColumn>
    </browsePage>
    </dynamicLookup>
    </lookups>
    </contentPack>
    <XOGOutput>
    <Object type="contentPack"/>
    <Status state="SUCCESS"/>
    <Statistics failureRecords="0" insertedRecords="0" totalNumberOfRecords="1" updatedRecords="0"/>
    <Records/>
    </XOGOutput>
    </NikuDataBus>
    </ReadContentPackResponse>
    </soapenv:Body>
    </soapenv:Envelope>



  • 2.  Re: Can  all the details including the ID and Value of dynamic lookup be retrieved using XOG API?

    Posted 03-18-2019 05:16 AM

    You could use the Query API to run the query behind your lookup and then call it the same way you call XOG.

     

    (so create a query with the same NSQL as your lookup, then use the query API to call that query)

     

    Some clues on how to use the Query API here ; Obtaining NSQL Query Output via XOG 

     

    (EDIT (sorry, I have been away) - isn't this question all very similar to this recent discussion ; Execute/Parse lookup query from gel  )