Hello,
I have next requirement and I tried everything but doesnt work:
I have a TABLE A with MainId and I want to create a relation with itself because this table record can be divided into multiple records and I need to store the information for the Main record Id. So I added the field ChildId and created relation TableA.MainId = TableA.ChildId.
But it breaks navigation on the forms and jumpRef method doesnt help either. It only helps when I set the property on the relation EDT relation to YES, but then it automatically adds condition to my query that I dont want.
I have a Form A which stores the data about Table A and menu item in its action pane to open the form to see related records from the same table. So Form B that opens has the same datasource as Form A (they both have Table A for datasource)
I added the code in init, init on a DS and executeQuery to filter by TableA.MainId , so to find its children. But it adds the condition '&& tableA.mainId = tableA.mainId' and then it doesnt return my records. When set EDT relation property to No it doesnt add that condition and it works well but then as I said navigation is broken.
I also tried removing the relation, so only have the field that I am populating in code and then filter on it but it still adds the unwanted condition and doesnt work as expected.
I also tried adding relation using RecId instead of MainId. I also tried adding two datasources on the opening form: TableA_ds and TableAchild_ds, that doesnt jelp either.
Is it because I have the same datasource on the main form and the form that I am opening from there ?
How can I fix that?
Thanks in advance

Report
All responses (
Answers (