8 posts in this topic
Help with relation scheme
By Sergej Ivanov
Hi, I got stuck with building a proper relationship scheme.
I'm making an database with several tables. One table contains information on archaeological features (key field Feature ID), another contains data on documentation. One document may contain information on several features, for this reason in documentation table I've created several fields (Feature ID 1, Feature ID 2, etc). The two tables are related through Feature ID=Feature ID 1; in the second table I've made a self-relation between all Feature ID fields.
In the Features layout I've made a portal displaying related records from Documentation table. Unfortunately it only displays related to the first field (Feature ID 1), while other fields (Feature ID 2, etc) seem remain unrelated.
What do I do wrong? Thank you!
Portal Calculation help
Im currently using a portal to relay certain information from my main database, the information that is related between the two are the fields of 'Brand' and 'Part Number'.
The only other fields i have in my portal will be
1. Sale Or Purchase (a drop down list to select either sale or purchase).
Is there any kind of calculation so that when i select either the 'sale' or 'purchase' option in the drop down list that it will either add or subtract the quantity i then enter into my quantity field, this way my stock list can keep up to date with the correct quantities?
Brand - ddd
Part No. - 123
Quantity - 3
Date - 22/02/2013
so after i have entered all of this data because i have sold 3 i need my calculation to take 3 away from the overall stock, and for the calculation to add 3 if this was a purchase
hope this makes sense
Filtering a portal with case shows too many results
I am trying to filter a portal using case to display records matching only one condition (the first it match going down), but it looks like the filter is taking into consideration all the options and displaying related records that match any of the conditions.
newA = oldA ; 1 ;
newB = oldB ; 1 ;
newC = oldC ; 1 ;
newD = oldD ; 1 ;
I thought the filter would work by only showing me the records that matched the first matched condition, but instead it's showing records that match any of the conditions.
EG: if I had a record that had 5 related records, 1 where newA = oldA and 2 where newC=oldC, the portal would show me those 3 records instead a of just the first one which matched the first condition newA = oldA.
Can anyone give me any suggestions as to how I can get it so that the portal only filter 'stops' checking the case condition once it's found a matched one?
Hide calculation on portal field help
Hi, I am trying to hide a field in a portal using a calculation on the "hide" behaviour.
Based on this article from some versions back - https://www.teamdf.com/blogs/a-very-nice-way-to-format-a-sorted-portal-using-conditional-formatting/. However, I am trying to use Global Variables to achieve this.
In short, my portal has a "category" field whose value is repeated. And I want to "GroupBy" it, and only show the first occurrence of the category and hide the subsequent ones.
<category> <name> <description>
Cat1 ... ...
Cat1 ... ... << Hide Cat1
Cat2 ... ...
Cat2 ... ... << Hide Cat 2
I tried to hide the <category> field using the behaviour with the following calculation:
This = Category::Name ;
$$Prev = $$NextPrev ;
$$NextPrev = This
$$Prev = This
I keep $$Prev as the previous category value, so that if the current "This" field is the same, I attempt to hide it.
This will hide all the <category> because presumably $$Prev = This.
However, If I test
a. $$Prev = "Cat1"
b. This = "Cat1"
"Cat1" gets hidden.
I am just wondering if there's something wrong with my calculation?
Thanks in advance!