Pricing Blog

Sort Objects

  • elli4931-1377037793099907072

    Vizualinx

    3 months ago

    in a formula i have a list of objects, i want sort it to show first the ones that the value (of that key) has a value. how can i do that?
    1377037793389318254-Screenshot_2025-05-27_at_23.35.15.png
  • lucasg-1377040219957624844

    Lucas G

    3 months ago

    Turn to array and sort that
  • What’s the use case for this?
  • elli4931-1377163715111293080

    Vizualinx

    3 months ago

    I'm building a mapping feature to import bank statements.
    Once mapped I save the schema to the database and next time the user imports a statement I pull the saved schema and map it automatically.
    Now if the statement doesn't have all the columns we have I want to sort it to show the ones mapped first. It looks weird otherwise. It's also a much better user experience.
  • elli4931-1377164205609848863

    Vizualinx

    3 months ago

    Thanks. I'll try that.
  • filip_dajkovic-1377199918426624042

    Filip Dajkovic

    3 months ago

    "Sort by" formula is used for that, you could do something like this, where you sort by the length of the value's string
    1377199918212452362-CleanShot_2025-05-28_at_10.10.322x.png
  • elli4931-1377349900009738310

    Vizualinx

    3 months ago

    Thanks guys. Sorted 👌
    🔥1