Dynamically adding sorted record IDs to a multi-select Lookup field

Dynamically adding sorted record IDs to a multi-select Lookup field

I can dynamically add IDs (on User Input of another field) to a multi-select Lookup field, but I can NOT add sorted IDs.
  1. IDs = Form1[Criteria].Lookup.getAll().distinct();
  2. IDsSorted = Form2[ID in IDs] sort by SortField;
  3. input.MultiSelectLookup = ???
I've tried:
  1. input.MultiSelectLookup = IDsSorted.ID.getAll();
  2. input.MultiSelectLookup:ui.add(IDsSorted.ID.getAll()); (or append)
  3. for each id in IDs
    {
         input.MultiSelectLookup:ui.add(IDsSorted.ID.getAll()); (or append)
    }
None of the ui:add or ui:appends work.

The others work, but they add the values in the sort order of the field "Lookup" from Form1 above.

SO weird, and neither I nor Creator Support can figure it out.
    Zoho Marketing Automation

            Zoho Pagesense Resources

              Zoho SalesIQ Resources



                    Zoho TeamInbox Resources

                      Zoho DataPrep Resources



                        Zoho CRM Plus Resources

                          Zoho Books Resources


                            Zoho Subscriptions Resources

                              Zoho Desk Resources

                                Zoho Projects Resources


                                  Zoho Sprints Resources


                                    Qntrl Resources


                                      Zoho Creator Resources


                                        Zoho WorkDrive Resources




                                            Zoho Campaigns Resources

                                              Zoho CRM Resources

                                                      Design. Discuss. Deliver.

                                                      Create visually engaging stories with Zoho Show.

                                                      Get Started Now