Issue in viewing data | Community
Skip to main content
maheswarik23685
New Participant
October 23, 2018
Solved

Issue in viewing data

  • October 23, 2018
  • 12 replies
  • 10667 views

Hi All,

I have created a 1:n link  between two tables recipient and contract. When we do a query choosing recipient as targeting dimension and contract as filtering dimension it gives me 0 results but data corresponding to recipient id are present in contract table.

Below is the code which I have added in contract table for creating one to many link between recipient and contract

<element label="Recipients" name="recipient" revLink="contract" target="nms:recipient"

             type="link">

      <join xpath-dst="@gid" xpath-src="@gid"/>

  </element>

Kindly let me know if the linking is done correctly

Thanks,

Maheswari

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by DebTr

Hi maheswarik23685204​,

Seems you are on track. As per your comment, in Data tab you can see 32 records satisfying the criteria mentioned in your changed link(ABX Recipients) between Recipient and Contract schema.

Please have a look if you are selecting the correct link in your query Or you can try  generic query editor output.

Regards,

Deb

12 replies

maheswarik23685
New Participant
November 2, 2018

Hi Deb,

Now query is working as expected.Thank you so much

Thank you,

Maheswari

DebTrAccepted solution
New Participant
November 2, 2018

Hi maheswarik23685204​,

Seems you are on track. As per your comment, in Data tab you can see 32 records satisfying the criteria mentioned in your changed link(ABX Recipients) between Recipient and Contract schema.

Please have a look if you are selecting the correct link in your query Or you can try  generic query editor output.

Regards,

Deb

maheswarik23685
New Participant
November 2, 2018

Hi Deb,

Previous:

<element label="Recipients" name="recipient" revLink="contract" target="nms:recipient"

             type="link">

      <join xpath-dst="@gid" xpath-src="@gid"/>

  </element>

Now I have changed code as below in abx:contract

<element label="ABX Recipients" name="abxRecipient" revLink="abxcontract" target="nms:recipient"

             type="link">

      <join xpath-dst="@gid" xpath-src="@gid"/>

    </element> 

In structure it shows two links for recipient in contract schema.Total no of contract records is 132. When I select gid from ABX Recipient link values are populating for gid but the count is  32 but

When I put a query with recipient as targeting and filtering dim selecting contract link exist such as gid  of contract it gives 0 as results

Thanks,

Maheswari

New Participant
November 2, 2018

Hi maheswarik23685204​,

It is good that you have figured out the issue.

In ACM, when you extend a schema no new table is created rather columns(attributes present in your new schema) are added to the existing table in database.

As you already have a link between the parent schema and recipient schema you can try a link between the extension schema and recipient with a different name to see if it works.

Regards,

Deb

maheswarik23685
New Participant
November 2, 2018

Hi Deb,

We found the issue but we didn''t know how to rectify it. Let me explain the scenario

Already a link exist between nms:recipient and abc:contract using cId (This is for global market abc is global namespace )

Below code is added in abc:contract

<element label="Recipient" name="recipient" target="nms:recipient" type="link">

<join xpath-dst="@cId" xpath-src="@cId"/>

</element>

  Our requirement is to create same 1:n link between nms:recipient and abx:contract  but with different fields gId. Here gId is a field in abx:contract  which is an extension schema of abc:contract

Issue:

We didn't notice that already link is existing in global schema with same name , when we saw the preview of abc:contract schema

it shows like below

<element belongsTo="abx:contract" label="Recipients" name="recipient" pkgStatus="never"

             revLink="contract" target="nms:recipient" type="link">

      <join xpath-dst="@cId" xpath-src="@cId"/>

      <join xpath-dst="@gid" xpath-src="@gid"/>

    </element>

Thanks,

Maheswari

New Participant
October 24, 2018

Hi Maheswari,

I tried the exact same code and it is working for me.

Can you share a pseudo code version of your actual code so that we can figure out what is the exact issue?

Regards,

Deb

maheswarik23685
New Participant
October 24, 2018

Hi Deb,

After adding the code I have selected  update database structure option but it doesn't show any option to update contract schema (checkbox disabled by default)

Thanks,

Maheswari

New Participant
October 24, 2018

Hi Maheswari,

Are you performing "Update Database Structure" post the change?

Regards,

Deb

maheswarik23685
New Participant
October 24, 2018

Hi Deb,

I tried with above code but still same issue.

Thanks,

Maheswari

New Participant
October 24, 2018

Hi Maheswari,

Please can you try the following in your schema?

<element integrity="normal" label="Recipients" name="recipient" noDbIndex="true" revLink="contract" revIntegrity="normal" target="nms:recipient" type="link">

      <join xpath-dst="@gid" xpath-src="@gid"/>

</element>

Regards,

Deb