Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Changing Script so F becomes Female, M - Male

In my ListBox, I want the letter F to show up as Female, M as Male otherwise Unknown.

How do I edit the script to do that. I have an idea, but I'm not sure about everything I need to include.

This is what i'm thinking I need to include. I know I don't have the M, Male included or the unknown.

@30 as Gender (F, Female)

What do I need to add or change about this?

9 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try as follows.

     Load if(Gender = 'M','Male', If(Gender = 'F', 'Female','Unkown')) as Gender_Name

     From xyz.

     For your case Gender should be replaced by @30

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anonymous
Not applicable
Author

so in the script you sent I should replace Gender with @30?

Such as

Load if(@30 = 'M','Male', If(@30 = 'F', 'Female','Unkown')) as Gender_Name

     From xyz.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Yes you are right.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anonymous
Not applicable
Author

Doesn't seem to be working for me. The Letters F and M haven't changed to Female and Male

eliran
Creator III
Creator III

Hi,

Maybe add an example since Kaushik's method is a correct one.

Eliran.

Anonymous
Not applicable
Author

what do you mean by add an example?

kamalqlik
Partner - Specialist
Partner - Specialist

Can you upload your application here ,so we can make changes here.

regards

Kamal

eliran
Creator III
Creator III

You can attach a file (qvw) like I'm doing right now.

See the script I have attached.

Hope it helps,

Eliran.

Not applicable
Author

You need to use the new field name rather than the @30 field name.  So if you're looking at a list box make sure it's for Gender_Name rather than @30