Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Calculating a value list index based on selection


This topic is 7726 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello FM Community. I am a decent FM developer, yet I have come across a problem. I believe the answer is slapping me in the face but I can't feel it. OK, I hope this isn't something ridiculous, but here goes:

1.) I have a radio-button list called "status"

2.) The user selects a button "made first phone call"

I want to have a second calculation field called "next step" in which the next item in the value list is selected.

I can't seem to find any function that lets you directly reference a specific index in the value list, like " myValueList[5] " would return the fifth item in the value list, or " myValueList[#next] " or something like that.

Please help!

Posted

Hi,

There may be another "cleaner" method, but this one works.

The sample is based on a "one word" value-list and a calculation. Scripting it would IMO be even more straightforward, when you get the principles.

Now, you'd surely need to "pay" a visit to this thread , from which the solution here provided is largely inspired, that also could help handling multiple words value-lists.

NextRadioButton.fp5.zip

Posted

Thanks UGO. Your assistance was very helpful. What I ended up doing isn't very efficient, but there were 10 items in my list with multiple words in each item, so your method seemed confusing to me. However, I completely glazed over the "choose" function for some reason. So, what I did was create an "index" value list from 0 to 9 and used that for my data entry, then hard-coded the other list items into the script using "Choose()" to return the correct list item. I know it sounds sloppy but it made more sense to me.

Thanks for your putting me on the right track!

Posted

Hi,

This tip was made really quickly. I jumped on Ray's Middlewords technique, but you could have better results with the Middle() function, which wouldn't require any index. Just target the next Carriage Return, and extract the string.

This topic is 7726 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.