Issue in viewing data | Community
Skip to main content
maheswarik23685
Level 3
Oct 23, 2018 12:49 PM UTC
Solved

Issue in viewing data

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.
DebTrAccepted solution
Level 6
Nov 2, 2018 10:13 AM UTC

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
Level 3
Nov 2, 2018 11:00 AM UTC

Hi Deb,

Now query is working as expected.Thank you so much

Thank you,

Maheswari

Translate
DebTrAccepted solution
Level 6
Nov 2, 2018 10:13 AM UTC

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

Translate
maheswarik23685
Level 3
Nov 2, 2018 9:51 AM UTC

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

Translate
Level 6
Nov 2, 2018 9:20 AM UTC

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

Translate
maheswarik23685
Level 3
Nov 2, 2018 7:08 AM UTC

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

Translate
Level 6
Oct 24, 2018 2:12 PM UTC

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

Translate
maheswarik23685
Level 3
Oct 24, 2018 1:36 PM UTC

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

Translate
Level 6
Oct 24, 2018 1:30 PM UTC

Hi Maheswari,

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

Regards,

Deb

Translate
maheswarik23685
Level 3
Oct 24, 2018 1:27 PM UTC

Hi Deb,

I tried with above code but still same issue.

Thanks,

Maheswari

Translate
Level 6
Oct 24, 2018 1:13 PM UTC

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

Translate