the field set as stored
Unstored calculation fields do not have an index. That's a direct consequence of specifying that a record be unstored.
But a calculation field that uses a get function such as Get ( Recordnumber ) will not automatically update unless they are unstored.
How are you using this field in your portal? If it's just to number the portal rows for display purposes, you don't need a field for that, you can use a symbol for it inserted from the insert menu.
the field is for display purposes but I thought I could use it to filter records
what I need is to be able to to filter a new table occurence by fetching the record number,
A record number value is ephemeral. The value returned by this function will vary with the context in which it is used. Thus, it's not a good choice for use in a relationship even if there were a way to make it an indexed value.
Get ( RecordNumber ) returns the position of a record in the current found set when it refers to records in your layout's table. It refers to the portal row of a portal when it refers to records in a related table. In both cases, just changing the sort order or deleting a record will change the value returned by this function--which is why it cannot be stored calculation and still update correctly.
is there no way of sorting a table with a calculation to return record 2?
going to have a sore head working this one out :(
Of course there is, but you'll first need to describe what you are trying to do in more detail first.
I can make a bit of a guess that we are headed towards using the GetNthRecord function to get the primary key value of the portal record, but a number of design issues need to be known before I can be confident that this approach will work or if it is the best option for what you want to do.