Hi Chuck
I'm having some 'fun' within Scriptmaker.

Specifically, I'm trying to Set Field using Case.

The fields involved are globals; the field being set and the field from which the data is being pulled.

Here's the algor'm...

SetField (Projects::_holdthis (

Case ( Projects::_Layout = "This" ; This::RecordID ;
 Projects::_Layout = "That" ; That::RecordID ;
 Projects::_Layout  = "Other" ; Other::RecordID ;
"Nada"
)

What's happening is nothing is happening; _holdthis doesn't have anything in it after the step. This, in spite of the fact that Projects::_Layout has This, That or Other in it.

What's going wrong here? Is there something about Case or SetField that it won't deal with a global field? All fields are Global Text.
What's the exact content of the Projects::_Layout field ?
If the content does not match exactly the string you use ("This", "That" etc ...) the Case condition will not be satisfied

On second thoughts re-reading your message I'm led to believe the problem might be different: the case function woulod write the string "Nada" should none of the above conditions be matched: if you find the field empty some other parts of the script might be responsible for it, or the field be an autoenter field of a null value, or write privileges might be missing


Ciao
G. Pupita
Certified FileMaker 8 Developer
FileMaker Business Alliance

Reply via email to