Skip to main content
vempatir680997
February 14, 2023
Question

how to sort the text field integer values

  • February 14, 2023
  • 4 replies
  • 0 views

Can any on help me for "how to sort the text field integer values",

example i have field name: data it is text field but in that field values are stored 10,000 and 80,000 and 20,000 so i want to sort those values if anyone know can you please help me with it?

4 replies

stefanhelzle0001
February 14, 2023

To sort data, you need to wrap it into a datasubset using the todatasubset() function and a paging info.

Some inspiration:

- https://docs.appian.com/suite/help/22.4/fnc_scripting_todatasubset.html#examples

docs.appian.com/.../Function_Recipes.html

gayathris111098
February 14, 2023

todatasubset(
a!forEach(
ri!array,
{
name: fv!item
}
),
a!pagingInfo(
startIndex: 1,
batchSize: -1,
sort: a!sortInfo(
field:"name",
ascending: true
)
)
).data.name

OR

todatasubset(
{ { name: 100 }, { name: 10 }, { name: 80 } },
a!pagingInfo(
startIndex: 1,
batchSize: - 1,
sort: a!sortInfo(field: "name", ascending: true)
)
).data.name

vempatir680997
February 14, 2023

Thanks for your answer.