Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have an application where I am using Qualify and Unqualify functions in script. Because of Qualify and Unqualify functions, one of the tables is not able to associate with Original table on some other field. Is there any way to associate it?
I tried changing the name of distinct table attribute on which I need to associate it with original table, but I am unable to run the script. How to tackle this?
Abhijit
Try this:
QUALIFY *;
UNQUALIFY NOTICE, CPSC;
OriginalTable:
LOAD *, RecNo() AS RecID Resident JSR_Notice_With_Parts;
DistinctTable:
LOAD Distinct * Resident JSR_Notice_With_Parts;
UNQUALIFY *;
Inner Join (DistinctTable)
LOAD NOTICE ,
FirstSortedValue(DISTINCT CPSC, -Count) AS CPSC
GROUP BY NOTICE;
LOAD NOTICE, CPSC, Count(CPSC) AS Count
Resident JSR_Notice_With_Parts
Group By NOTICE, CPSC;
DROP Table JSR_Notice_With_Parts;
...etc...
Can you share the script you are using and the field you want to connect on from the Qualified table?
You need to un-qualify the field you are associating
Foe Eg:
Qualify *;
UnQualify [Associating Field Name];
Thanks you for your reply. Here is my script and sample data.
On selection of dates in Scroll bar it should filter the data in table 2 as it is filtering the data in table 1.
Abhijit
Try this:
QUALIFY *;
UNQUALIFY NOTICE, CPSC;
OriginalTable:
LOAD *, RecNo() AS RecID Resident JSR_Notice_With_Parts;
DistinctTable:
LOAD Distinct * Resident JSR_Notice_With_Parts;
UNQUALIFY *;
Inner Join (DistinctTable)
LOAD NOTICE ,
FirstSortedValue(DISTINCT CPSC, -Count) AS CPSC
GROUP BY NOTICE;
LOAD NOTICE, CPSC, Count(CPSC) AS Count
Resident JSR_Notice_With_Parts
Group By NOTICE, CPSC;
DROP Table JSR_Notice_With_Parts;
...etc...
Thank You Gysbert. I could associate it with the original model.
Abhijit
Thank You Rupam. It was helpful.
Qualify *;
Unqualify <AssociativeFieldName>;
Load script; // Table Load script where you want to qualify field names other than <AssociativeFieldName>
Unqualify *; // need to put this at the end of load script otherwise the next table load script will take it as qualify.