Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to use the outcome of an expression in the set-statement of a second expression and use the outcome of this second expression in the set-statement of a third expression.
I'm not sure if what I'm trying to do is possible. Has anyone tried this with succes ?
Example of what I'm trying.
suppose you have 2 tables
Table Article
- field : Product
Table Orders
- field : Order-number
- field : Order-line
- field : Product
- field : Amount
- field : Delivery-Date
Now : if someone chooses a Product I want to show all the fields in the table Orders, but only for the last record in this table (for the chosen product). The last record is the record found when you sort the table Orders by Delivery-Date, Order-number, Order-line. So I need to find the last Delivery-Date, for this date I need the last Order-number and for this order-number I need the last order-line. For this orderline I need to display all the data.
Have you tried using FirstSortedValue, using a combination of all three fields as the sorting order? I haven't tried it, but I think it should work just fine, without all that compexity with nested Set Analysis... Just be careful when you operate wit hyour delivery Date - you want to use the num() portion for the sorting purposes...
I've tried FirstSortedValue and it seems to work.
Thanks