AnsweredAssumed Answered

Get Related Record Number?

Question asked by flybynight on Jan 22, 2013
Latest reply on Jan 22, 2013 by Mike_Mitchell

I'm looking for a way to get the position (number) of a realted record, within the set of related records to one parent record.

For instance, line items on an invoice - I want to be able to have a field that says which line that particular line item is.

The relationship is set up to sort by line item ID number, so it will always be in creation order.

I can accomplish this with an auto-enter calculation of Get (RecordNumber). However, if one of the line items is deleted, it does not re-calculate. For instance, if there were 5 line items, but then line item #3 was deleted, #4 should become #3, and #5 should become #4.

I don't want to make it just a calculation field, because sometimes we will perform a search that will return different line items from multiple parent records, and I don't want it to change the Record Number based on that found set.


I am making a concantenated field that combines the Invoice Number with the line item number. So, like item #2 of Invoice # 1234 will have a LineItemNumber of 1234-2.


I'm sure I'm missing something and this is much easier than I am making it out to be… ? Or at least I hope so.


Thanks for any help!