How to Get a List of Radio Button Options or the Index of Selected Radio Button Option in Deluge

How to Get a List of Radio Button Options or the Index of Selected Radio Button Option in Deluge

Hi,

I have a list of radio button questions, each having 3 unique (texts are different) options. For example:
Question 1:
- This is an answer
- Well this is another answer
- You could also choose this answer

I want to assign scores for each option as 1,3 and 5 respectively.

My first thought is to get the index of the selected radio button option. Such as:

index = Question1.getIndex();
if (index == 0) Score = 1;
else if (index == 1) Score = 3;
else if (index == 2) Score = 5;

I could not find a getIndex function for radio buttons, so a function to list all possible options could also work. Such as:

allOptions = Question1.getAllOptions(); // ["This is an answer", "Well this is another answer", "You could also choose this answer"]
index = allOptions.indexOf(Question1);
if (index == 0) Score = 1;
else if (index == 1) Score = 3;
else if (index == 2) Score = 5;

If there is no way to get the index of the selected radio option, maybe I can add a) b) c) to the answers:

Question 1:
a) This is an answer
b) Well this is another answer
c) You could also choose this answer
if (Question1.startsWith("a")) Score = 1;
else if (Question1.startsWith("b")) Score = 3;
else if (Question1.startsWith("c")) Score = 5;

Would it be possible? Or is there any other easier solution to this?

    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      • Sticky Posts

      • Share your success story

        We would like to hear from our passionate users how much Zoho Creator has changed the way you work and benefited you. If you would like to share your story to us and be featured as a proud user of Zoho Creator, then this is for you. Fill up the form below and if you want to be included in a case study, we will get in touch with you to get further details. So what are you waiting for? Tell us your story. Charles
      • Merge and Store v1 API depreciation

        Hi Zoho Writer users, The Merge and Store v1 API allows you to store the merged document in Zoho WorkDrive. The response of this API will be returned with the document's ID only after the merge is complete. In Deluge, the maximum timeout for operation
      • Zoho Creator Developer's Conference 2017 !!!

        We welcome all our Creator Developers! You're invited to join us for our annual Zoholics Developers conference August 29th–31st! This is your chance to get training and guidance on Zoho Creator from our most knowledgeable custom app builders.       Zoholics Developers is a three-day event where you'll participate in interactive workshops to hone your app-building skills, get questions answered by Creator experts with personal one-on-one sessions, and connect with other Creator developers from around

      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


                Zoho Orchestly Resources


                  Zoho Creator Resources


                    Zoho WorkDrive Resources



                      Zoho Campaigns Resources

                        Zoho CRM Resources

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner




                          Zoho Writer Writer

                          Get Started. Write Away!

                          Writer is a powerful online word processor, designed for collaborative work.

                            Zoho CRM コンテンツ




                              ご検討中の方