Jump to content

replace numbered field with a value from a valuelist


jetmcquack

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

Recommended Posts

  • Newbies

hello everybody,

my problem is the following:

i have records with numbered index fields like:

Record: 1 Index:  10

Record: 2 Index:  20 

Record: 3 Index:  25 

Record: 4 Index:  27

Record: 5 Index:  30

and i need them replaced with the value of a valuelist like:

a,b,c,d,e

respecting the sort order of the numberd index field. 

Basicaly my output should be

 

Record: 1 Index:  10 CalculatedValue: a

Record: 2 Index:  20  CalculatedValue: b

Record: 3 Index:  25  CalculatedValue: c

Record: 4 Index:  27 CalculatedValue: d

Record: 5 Index:  30 CalculatedValue: e

is there some function to help me?
To make it harder i can add that the index field can repeat across my table, as it is actually a SubIndex based on another Index.The Final Output should be something like:
 

Record: 1   Index: 1 SubIndex:  10 CalculatedValue: a

Record: 2   Index: 1 SubIndex:  20 CalculatedValue: b

Record: 3   Index: 1 SubIndex:  25 CalculatedValue: c

Record: 4   Index: 1 SubIndex:  27 CalculatedValue: d

Record: 5   Index: 1 SubIndex:  30 CalculatedValue: e

Record: 6   Index: 2 SubIndex:  10 CalculatedValue: a

Record: 7   Index: 2 SubIndex:  21 CalculatedValue: b

Record: 8   Index: 2 SubIndex:  25 CalculatedValue: c

Record: 9   Index: 2 SubIndex:  30 CalculatedValue: d

Record: 10 Index: 2 SubIndex:  40 CalculatedValue: e

THANKS A LOT FOR HELPING!!!!!
 
if i wasn't clear just asks, as it's really hard to explain.
thanks a lot!
Cisco
 
Link to comment
Share on other sites

Hi,

 

I get that your sorting the index number..

off the top, isn't lower case a =32,     I know the capital A = ascii 65,  B=66, C=67

Maybe use a loop to run down your sorted list increment  65+1 storing it in a field

 

R

Link to comment
Share on other sites

This topic is 4035 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.