Skip to main content
September 26, 2022
Question

other radio button to keep at end of dynamic list of radio buttons

  • September 26, 2022
  • 2 replies
  • 0 views

Hello

Assume radio buttons A,C, Z, Other, F (db gets data in this manner) we can easily sort but other should be at end of the list

The order is alphabetic but other to be end

Using Query Records

  • Ant
  • Cat
  • Frog
  • Z
  • Other

if we just do sort, we can get below which is wrong as per req

  • Ant
  • Cat
  • Frog
  • Other
  • Zebra

2 replies

mikes0011
Brainy
September 26, 2022

This completely depends on how you're currently getting your radio button options.  If it's just a manually-defined array of labels and values, for example, you would simply add an "other" option to the end. Or is it DB-backed? In that case you would simply need to append a label of "Other" to the end of the current list of labels, and decide on some value that would correspond to the "other" selection and not overlap with any of the existing ones.  If you'd like to post some sample code and/or screenshots, that would go a long way as far as helping us make some educated guesses as far as helping you figure out how to structure this correctly.

The Expression Guru
September 26, 2022

Thanks [mention:b45a4f6a20b14a008e4e0ec732a8bf98:e9ed411860ed4f2ba0265705b8793d05]

I did append and it works

append(

getrecord without 'Other' using filter{}

,

getrecord ONLY with 'Other' using a!queryFilter in queryRecordType() and batchSize=1


)

I did this as we have language and some dynamic data, cannot hardcode Other with some key etc.

Its all DB driven.