• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Splitting a List

Community Beginner ,
Apr 16, 2021 Apr 16, 2021

Copy link to clipboard

Copied

I have a list of 12 items that only one need be selected.  It works best as being either in a List Box or a list of Radio Buttons.  The issue I would like to solve is with respect to the subsequent merging (with other lists) of the selected list item.  Five of the items fit best at the end of the merge whereas seven fit best at the beginning.  I have thought to split the list into separate 5 and 7 items however I would like it such that only one item of the 12 is selected.  Any suggestions would be appreciated.

TOPICS
How to , JavaScript

Views

617

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 17, 2021 Apr 17, 2021

Copy link to clipboard

Copied

I don't quite follow what you mean... Do you want to create two separate lists, but only allow one selection in both of them? If so, then you can add a script to each field that resets the other field when a selection is made in the former.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 17, 2021 Apr 17, 2021

Copy link to clipboard

Copied

Would the JS be the same for either a List Box or Radio Button?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 17, 2021 Apr 17, 2021

Copy link to clipboard

Copied

Yes, although I don't really understand why you would need to do that for a radio-button group, which can be placed anywhere on the page, unlike a list box field, which is a single rectangular field...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 17, 2021 Apr 17, 2021

Copy link to clipboard

Copied

I will try the 2 separate list boxes and see how that works out.  Could you please provide me with the script that would do the job?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 17, 2021 Apr 17, 2021

Copy link to clipboard

Copied

I see in every post you are asking people to do scripts for you, in one of your post out member gave you like 20 scripts and you just keep asking for more.

You should really try to research and learn how to do javascript and instead of asking for scripts for free you should hire someone to do job for you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 18, 2021 Apr 18, 2021

Copy link to clipboard

Copied

You can use something like this as the custom validation script of each one of the list box fields:

if (event.value) this.resetForm(["Name of the other field"]);

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 18, 2021 Apr 18, 2021

Copy link to clipboard

Copied

LATEST

Sorry, forgot this type of field doesn't have a Validation event... Use the Selection Change event.

You will have to add a blank default item to each field for it to work, though.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines