Hello!
Please help me solve this situation:
- I have a custom table called "header"
- I have another custom table called "lines" where there is a Field "ItemID".
- I have a Page called "HeaderPage"
- I have another Page called "HeaderLines1" (Type ListPart)
- I have another Page called "HeaderLines2" (Type ListPart)
In the Header page, I have HeaderLines1 and HeaderLines2 as a subpages. Now, the ItemID filter is different in HeaderLines1 and HeaderLines2. So in each subpage, I go to the ItemID field and put the filter in the TableRelation property.
The problem is that I can put any value, like 'blablabla' in the field, and it doesn't do any validation to see if the Item exists.
If I put the filter in the TableRelation property of the "Lines" table, the filters in the subpages are ignored.
¿How can I correctly do this? Having 2 subpages with the same table as datasource and different filters?
Thanks.
0
Comments
You need to use the subpageview/subpagelink properties on the header page to restrict the data shown on the subpages...or code in each subpage (or the header page) to dynamically apply filters if there's more logic involved.
My big recommendation is still to spend some time with an experienced resource here...hearing that you're trying to use the TableRelation property to apply filters has me thinking you'll just play around with settings in the other properties until you get it (somehow) working. You can create some ugly solutions if you don't fully understand what exactly you're doing.
http://www.epimatic.com
The thing is that if I use the subpageview/subpagelink, I can only filter by "Item No." I cant filter for example by "Item Group"
¿So how could I filter by "Item Group" in the subpage without using the TableRelation property in the page field? ¿What kind of code I need to put?
The way I'm able to make it work is by putting the TableRelation in the subpage and by Code using "Onvalidate" in the table, I check if the user is putting an invalid Item by hand.
I hope there is a better way of doing this.