Using tables to fill properties of objects...and either/or

Hey again.

I’m creating a number of similar objects with different properties. Noting how one can use a table to create such a list, which I’ve done successfully, I have one question:

Can one use a table to set up either/or properties? Let’s say I have a list of chemicals, and I want them to be either alkaline or acidic, can I set this in that table as well?

So far it seems I can easily set up text and number properties this way, but I’ve yet to be able to set an either/or property like this. It could be an issue with finding the correct syntax, or possibly not something that can be done via tables.

Example: (and not a good one from a chemistry standpoint, and should likely be a numerical property…but that’s besides the point :slight_smile: )
If I wanted to create a table of objects that can be “acidic or alkaline”, as an either or property so I can check an object to see if it’s either acidic or alkaline, and skip having a text-based property ‘if the PH of Blarg is “acidic”’

The Table of Stuff and Things
chemical               PH
milk of magnesia       alkaline
hydrochloric acid      acidic

Obviously, that example above throws errors, as “PH” expects to be a numerical or string property.



Sort of self solved:
I forgot about custom “kinds of value”.
I created this:

PH is a kind of value. The PHs are acidic, neutral, and alkaline.

And then in my table, I have a heading for chemicals and PH.
And now I can set the PH for each object in the PH column without using a sting value.

However, I’d still love to know if there is a way to set either/or values for possible future use, as this still requires me to query the “if the PH of Blarg is acidic” instead of “if Blarg is acidic”, which is fine for me as I really needed 3 possible values, but would be annoying if I only needed 2 :slight_smile:

I don’t believe so.

“if X is acidic” works the way you want, though.

PH is a kind of value. The PHs are acidic, neutral, and alkaline.

A chemical is a kind of thing.

Some chemicals are defined by the Table of Materials.

Table of Materials
chemical	PH
milk of magnesia	alkaline
hydrochloric acid	acidic
lemon juice	acidic
water	neutral

Instead of jumping:
	if hydrochloric acid is acidic:
		say "Yes.";
	say "Acids are [list of acidic chemicals]."

Ahh, excellent, thanks. Makes perfect sense that way. The docs didn’t seem (in my reading anyway) to hint that “if X is acidic” would work, so I wasn’t sure if that was an option.

Thanks again!

It’s always worth trying it before posting that it doesn’t work. :slight_smile: