Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Problem with Radio button "If" statements


Distance2006
 Share

Recommended Posts

I am having trouble with "if" statements based on the contents of radio button fields. I have a radio button field with six choices. The choices come from a custom value list

 

I've been trying to get a script to change to a certain layout depending on the content of that field. I've tried "If Field = "one of the six choices" then perform script, but it does not seem to work. I've tried a pattern count approach to the content of the radio button selected field as well with no luck.

 

Finally, I created a script that copies and pastes the contents of that field into another field. Then I do the "if" on that new field, and this seems to work.

 

Am I doing something wrong with the Radio Button fields. I seem to have a similar issue with actions taken on fields that are drop downs versus when the user actually types the word. I think these are related problems and I'm missing something pretty basic

 

Any help would be appreciated.

 

Thanks,

Link to comment
Share on other sites

It's hard to diagnose from what you've given us. It would help if you could provide a sample file, or at least post the actual script and provide some actual field values that are not working.

Link to comment
Share on other sites

I'll try to describe the script better.

 

My radio button field is called "Coverage" and has six custom values:

GPL

PEC

CPL CM

CPL Occ

GL/PL

GL/CPL

 

My functional scrip right now reads:

 

If coverage = "CPL CM"

perform script "Go to CPL CM Choice"

Else if coverage = "CPL Occ"

perform script "Go to CPL Occ Choice"

Else

Perform script "Go to GPL Choice"

 

I've tested each sub script, and they all do as they are supposed to. It's failing to make the choice here. I don't know if it's the formating of the words or perhaps the spacing?

 

As I said in the earlier post, I seem to have a similar problem with drop down selections. I have a field called "Carriers" It is populated with about 100 names of companies. Some are slight variations of the same name that need to be there. In order to grroup them all together, I've created a field called "Carrier Master" I am trying to get all of the variations grouped together under this master name.

 

I've tried to create a find that says:

 

If Carrier = "company a" insert text in "carrier master" where the text inserted is the group name

 

I've done the exact variation of the 100 names in the drop down list (very tedious) and it still will not do the find properly. I posted this earlier and got the suggestion to use patterncount, which seems to work. What I don't understand is why this isn't working the way I scripted it.

 

I think both of these are connected issues about how I'm doing someithng when the information is provided to the user, either as a radio button or a drop down.

 

Thanks for taking a look.

Link to comment
Share on other sites

Also, make sure the field type in this case is Text.

 

You might look at a copy of your problem field with the value list removed. Is there more than just the one line of text (like an extra carriage return)? Could there be old values still in there (from when the value list showed different values)?

 

If there are multiple values, old values, or line returns, then your If[] calc as written won't work. You would need to either clean up the data, or use patterncount() or position() for scan the field for the desired text.

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

Terms of Use