Jump to content

Value List & text version of VL


Raizel

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

Recommended Posts

field = "Music Format"

Value List (checkbox)
Album
Cassette
CD
EP
Single
iMusic
Same field done in text format (temp). However, when the checkbox VL is empty, content still exists in text field version.

My aim is getting my calculation to work. Field = "zFormat" used in my header.
Case (
MUSIC FORMAT = "ALBUM"; "ALBUM";
MUSIC FORMAT = "CASSETTE"; "CASSETTE";
MUSIC FORMAT = "CD"; "CD";
MUSIC FORMAT = "EP"; "EP";
MUSIC FORMAT = "SINGLE"; "SINGLE";
MUSIC FORMAT = "iMUSIC"; "iMUSIC";

MUSIC FORMAT = "iMUSIC"  and MUSIC FORMAT = "CD"; "CD + iMUSIC"
MUSIC FORMAT = "ALBUM"  and MUSIC FORMAT = "iMUSIC"; "ALBUM + iMUSIC"
)

Link to comment
Share on other sites

If I follow this correctly (??) you want the zFormat field to be a Calculation field (result is Text) =

Substitute ( Music Format ; ¶ ; " + " )

This will return a list of the values that are checked in the Music Format field, separated by +.

Note that values will be listed in the order in which they were checked. If you want to follow the order of the value list, there is more work to do.

 

I am afraid I couldn't understand this part:

44 minutes ago, Raizel said:

Same field done in text format (temp). However, when the checkbox VL is empty, content still exists in text field version.

 

P.S. This test:

MUSIC FORMAT = "iMUSIC"  and MUSIC FORMAT = "CD"

will never be true. If A is equal to B then it cannot be also equal to C. To test if both values are checked (possibly alongside others) you can use:

ValueCount ( FilterValues ( "CD¶iMusic" ; Music Format ) ) = 2

 

Edited by comment
Link to comment
Share on other sites

The text version of my VL had stuff I didn't see so thought it wasn't working. Don't need it now that my zFormat field works.

I replaced my calculation with your Substitute and got the results I was trying to achieve. Doesn't matter the order, I know it's based upon order checked. Thanks.

Link to comment
Share on other sites

Step back. The Substitute is working under all conditions so I'm getting duplicate Format where only one is checked. I'm only wanting Substitute when two Formats are checked.

Where Format has "Single" checked (one occurrence) then zFormat will equal """ because Format will be used.

Where Format has "Single" and "iMusic" checked (two occurrences),  zFormat will equal "SIngle + CD" not "Single + Single + CD".

Link to comment
Share on other sites

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