Global header and lines form not working as expected

Hi All,

I have a custom Global form which has Header and lines. The issue is lines records are repeating (there is only one record) for a header of one particular entity (USMF) but not for other entity (INMF) there is no issue.

To pull records across entity I have enabled “Allow cross company query” property of the datasource in the form.

So what’s the problem you need help with?

You mentioned that you want a cross-company query but you’re getting different data in different companies, therefore it’s not a cross-company query. Is that the problem?

Or is it about the duplicate lines? If so, review your query and data. If you failed to find the problem, please give us more information about them.

Hi Martin,

Thanks your your reply. The problem here is the duplicate lines.

Let me repeat: Review your query and data. If you failed to find the problem, please give us more information about them.

We can’t find a bug in your query without knowing anything about the query. Also, just looking at the data may tell you whether it works or not, but it doesn’t show which part of your query is wrong. And because we knowing about your data either, the result tells us nothing.

All I can guess is that you have another table joined to lines which causes this behavior. But I have no chance to verify that it’s the case, which table it is, what condition is wrong or how you should fix it. That would require information from you.

Hi Martin,

Below is the explanation of the issue.

  1. Yes you are right I created another table for line details which have relation (one to many recid relation) to lines table and here all tables are global.

  2. I didnt change the query of the form

  3. Lines details table (data source) is joined to lines table with link type as “delayed” in the form.

Please let me know if you need some more information.

You said that lines are repeated but your scenshots seems to show line details. So what is repeated? What’s the query string of the query that you have a problem with? (You can see it in debugger.) Do you have relations defined on your tables. What data do you have in those tables?

Unfortunately the information that you didn’t change the query is not very useful to me, because I don’t know what form are you talking about and how the queries looked like before. Also, didn’t you say that you changed “Allow cross company query” property and added an extra data source? That sounds like changes to me.

If you use “Delayed”, it’s not a join. It’s a link; the data source will make use two separate queries. If you used a join, it would would be sinhle query with several tables.

By the way, why did you change “Allow cross company query”? What are you trying to achieve by that?

Hi Ravi,

Your explanation is not sufficient here. Make sure you have followed all basics for header line.Below are few…

1.Line Table should have relation with header table.

2.Field which is used for relation should be primary index of header…

3.You don’t have to use cross company if Savedatapercompany property is set as No…

4.Make sure Join source property of Line datasourse is pointing to header datasource.

5.Delayed link type would be fine.

If you have followed all above and still its not working then i suggest you to recreate sample table again and try it.I feel you may have missed something from above.

Best Luck!

Hi Manas,

Thanks for your help. I followed all the points you mentioned but still the same issue. I cannot see the records without enabling ‘Allow cross company query’ property on the header datasource.

Please look into the below points.

  1. For testing purpose I have records from two entities (USMF and INMF).

  2. For INMF, header and lines are displaying as expected. But for USMF records are repeating in lines even though it has only one record in the table.

  3. I am viewing the form from USPI entity.