If/Then To Autofill Fields (Base)

First. I’m in Windows, using version 7.6.2.1.

I’m looking for a way to, basically, setup an If/Then in my records and I’m not sure how to do it.

If Owner = “Available”, then Marker = link to an image

I have other criteria as well but it’s all different versions of exactly that.

And if it can be setup to change that Marker either to another imagine when the Owner field is edited either automatically or manually would be ideal. Sometimes the Marker will need to change but the Owner will not.

I’ve been looking around for a similar example to work with but I’m not finding anything that seems to work for me, or is compatible with my experience level when it comes to things like running a script/macro/whatever.

I guess question is can it be done… and if so what’s the easiest way to set it up?

Thanks in advance.

For all internal databases (and many others) use CASE WHEN

... CASE WHEN "Owner" = 'Available' THEN … WHEN … THEN … ELSE … END AS "Marker"

but: This is code of a query. Might be I didn’t understand it the right way.

If you don’t need a query, but wish to modify existing records it is possible to use an UPDATE-command like

UPDATE mytable SET Marker= 'some link'  WHERE Owner = 'Available';

This can be put in the SQL-command from thw menu or in a macro.

Sorry for the late reply, I wasn’t working on this over the weekend.

I entered in the string you listed above and made my edits to point to the right places, but I get an error saying…

2: Column not found: MARKER in statement [UPDATE “records”

SET Marker]

I figured it out though, needed some quotes around the column names and it took a second but after hitting execute I have 4268 updated rows. Much better than doing it by hand.

Thanks a lot for your help.