AnsweredAssumed Answered

Portal records and List command not following portal sort

Question asked by ErichWetzel on Mar 12, 2009
Latest reply on Mar 12, 2009 by comment_1

Title

Portal records and List command not following portal sort

Post

I have set up a portal showing related records.  The sort of the portal is by date and then by a time. This allows the contents of the portal to be shown chronologically.  The related items in the portal are not always entered in a chronological order.  For example a related item dated 3-10-2009 might be entered after a related item dated 3-11-2009.

 

The portal will show them in the expected sort order 3-10-2009 then 3-11-2009.

 

If I ask for a field in the portal, a time for example, to be listed:

List (related::time)

the list returns the data in the order the related records were created in rather than the order that the portal is sorted in.

 

To serve the purpose I have, I need the items returned in the sorted order from the portal not the created order.

 

The actual use I am trying for is to get a script to generate a list of the related items into a field, essentially listing the date, time started, time ended if there is one and a description of the event taking place.  This is needed in a date and time started order using a Variable $portalrow to represent which portal row to pull data from.  GetValue(List(File::field) ; $portalrow) where I am running a script loop asking for each sequential portal row by incrementing $portalrow and simply asking for the related data. 

 

I assume that the request I am making is not being performed on the showing portal but rather by default to the creation order of the related records.

 

Additionally, I seem to be getting inappropriate returns.  Periodically I am being given a related::timeend that is part of another related record not the $portalrow record.  In these strange cases the timeend of the $portalrow record is blank.

 

Advice?

 

Thanks - Erich

Outcomes