Sort Multi-Select Lookup when Lookup table is in a different application.

Sort Multi-Select Lookup when Lookup table is in a different application.

I think I'm close on this, but it's not quite working. This is my function created in the application containing the table of selections:

collection sortfeats()
{
sortlist = (pressing_features[ID != 0].pressing_features sort by Added_Time asc).getAll();
return Collection(sortlist);
}
When I execute the function it returns the list of items successfully, in the order I want.

In the application containing the form w/ the Lookup field, I have this coded on-load of the form:

sortlist = pressing_features.sortfeats();
input.Pressing_features:ui.add(sortlist);

"pressing features" (lower case p) is the application name containing the table.
"Pressing features" (upper case P) is the name of the lookup field in the other application.
When I remove the ".getAll" from the first function, the lookup field returns the first item in the list only, but it's the correct first item based on how I want it sorted. So, it seems that I'm doing something right. But w/ the ".getAll" included in the function the Lookup field becomes empty w/ no selections available.
Any ideas out there...Thanks!

    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


                Zoho Orchestly Resources


                  Zoho Creator Resources


                    Zoho WorkDrive Resources



                      Zoho Campaigns Resources

                        Zoho CRM Resources

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner




                          Zoho Writer Writer

                          Get Started. Write Away!

                          Writer is a powerful online word processor, designed for collaborative work.

                            Zoho CRM コンテンツ




                              ご検討中の方