hassam36 Posted February 2, 2009 Share Posted February 2, 2009 Hi I have an issue with sorting a portal by one of its fields. When this portal represented the original instance of the underlying table I was able to sort it by a specific field. However, since changing the portal to reflect a second instance of the underlying table, it is no longer sorting by any field. Any ideas why this or how I can get it to sort again? John Link to comment Share on other sites More sharing options...
bcooney Posted February 2, 2009 Share Posted February 2, 2009 (edited) If you change the table occurrence of the portal (which I assume is what you mean by "instance"), then you need to define the portal sort because its context has changed. All the fields need to have their context changed to reflect the different TO as well. Edited February 2, 2009 by Guest Link to comment Share on other sites More sharing options...
hassam36 Posted February 2, 2009 Author Share Posted February 2, 2009 I changed the table occurance and changed all the fields in the portal to reflect the new occurance. When I open the Portal Setup window and select the sort option, there are no options to change the sort to reflect one occurance or another. The records just reflect the underlying table. So I believe everything should be in synch.. Is there something else? Link to comment Share on other sites More sharing options...
bcooney Posted February 2, 2009 Share Posted February 2, 2009 The portal sort options reflect the TO on which the portal is based, and list the fields for that TO. Your portal isn't sorting? Link to comment Share on other sites More sharing options...
hassam36 Posted February 3, 2009 Author Share Posted February 3, 2009 No, it definitely isn't sorting. It only sorts when I use the original table occurance as the portal (and associated fields), which I cannot any longer. Link to comment Share on other sites More sharing options...
bcooney Posted February 4, 2009 Share Posted February 4, 2009 Please post a demo file. Link to comment Share on other sites More sharing options...
hassam36 Posted February 4, 2009 Author Share Posted February 4, 2009 OK. I need to get it from our IT group first.. Link to comment Share on other sites More sharing options...
hassam36 Posted February 5, 2009 Author Share Posted February 5, 2009 Hi BCooney Attached is the file with the issue portal sort issue (logon=admin, password=test11). The problem portal is located on the 'Budget Worksheet' layout (use 'Budget' button on right) and it is on the Revenue-UCS tab--bottom portal (marked) that is not sorting. It is supposed to be sorted by the cost center field, but is not. The portal is based on a table occurance and not the underlying table. Any insight you have as to why this portal is not sorting would be greatly appreciated. John CIP_BUDGET_ME_2-4-09.zip Link to comment Share on other sites More sharing options...
comment Posted February 5, 2009 Share Posted February 5, 2009 Your portal is showing records from one table occurrence, but set to sort by a field from another. Just clear the current sort order and reselect the field from the list on the left. Link to comment Share on other sites More sharing options...
hassam36 Posted February 5, 2009 Author Share Posted February 5, 2009 That worked--thank you. How can you tell that which table occurance the columns belong to on the left when nothing is stated as such? Link to comment Share on other sites More sharing options...
comment Posted February 5, 2009 Share Posted February 5, 2009 They belong to the same TO the portal is showing records from. What you had there is a bit of history. Link to comment Share on other sites More sharing options...
hassam36 Posted February 5, 2009 Author Share Posted February 5, 2009 How did you know there was a bit of history? Link to comment Share on other sites More sharing options...
comment Posted February 5, 2009 Share Posted February 5, 2009 Because you couldn't have selected that field otherwise. And because you said so in the original post. Link to comment Share on other sites More sharing options...
hassam36 Posted February 10, 2009 Author Share Posted February 10, 2009 Now that the portal is sorting correctly, I still have an issue with a summary field that I thought would clear up once the sort was functioning. I am using a calculation field in the underlying table that contains the GetSummary() function with a break field. This is just to sum dollar amounts in each record for all like records based on a similar value in the cost center field (break field). This worked fine when I had the original portal/table occurance on the layout that represented the underlying table. Now it doesn’t with the second portal/table occurance. So I changed the GetSummary function in the underlying table to reference the portal/table occurance that is now on the layout. This still doesn’t work. The summary just displays a total for all the portal records and does not display the value broken out by the break field. Any ideas? Link to comment Share on other sites More sharing options...
comment Posted February 10, 2009 Share Posted February 10, 2009 I changed the GetSummary function in the underlying table to reference the portal/table occurance that is now on the layout. I am not sure what exactly you mean by that. I believe you only need to change the context from which the calculation is evaluated. Link to comment Share on other sites More sharing options...
hassam36 Posted February 10, 2009 Author Share Posted February 10, 2009 What I was referring to was changing the fields that are referenced in the GetSummary() function from references from the underlying table to references to the new table occurance/portal on the layout: Previously (using original table occurance in function) GetSummary(brlCccCstiID; brlCostCenter) **With the new table occurance, the field that should be displaying the summed dollar based on the cost center break field is blank for all records.** Now (with new table occurance in function) GetSummary(BUDGET_REVENUE_UCS_LINES 3:: brlCccCstiID, BUDGET_REVENUE_UCS_LINES 3:: brlCostCenter) ** This displays the total dollar value for all the records in the portal. It is not summed for the like fields based on the break field.** Link to comment Share on other sites More sharing options...
comment Posted February 11, 2009 Share Posted February 11, 2009 That is not a good idea. As I said, change the context of the calculation to the same TO that is used by the portal, and do NOT include TO names in the field references. Link to comment Share on other sites More sharing options...
hassam36 Posted February 11, 2009 Author Share Posted February 11, 2009 I'm not sure what you mean when you say to 'change the context of the calculation'? The portal and the fields in it (one of which contains the field containing the calculation) already reflect the new table occurance. Link to comment Share on other sites More sharing options...
comment Posted February 11, 2009 Share Posted February 11, 2009 what you mean when you say to 'change the context of the calculation'? Link to comment Share on other sites More sharing options...
hassam36 Posted February 11, 2009 Author Share Posted February 11, 2009 Thanks a lot once again--I did not know that existed.. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 5546 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now