Jump to content

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

Recommended Posts

Have just started to upgrade an old solution of mine to FM7.

Liked the idea to be able to use the same script for many different things through the new scriptparameter? option.

Can anyone explain to me why this script ain't working (manusparameter=scriptparameter=?). The scriptparameters are correctly written and the layoutnames too.

Case(

Get(Manusparameter)="training"; "evaluation training";

Get(Manusparameter)="food"; "evaluation food";

Get(Manusparameter)="education"; "evaluation education";

Get(Manusparameter)="economy"; "evaluation economy";

Get(Manusparameter)="social"; "evaluation social";

Get(Manusparameter)="material"; "evaluation material"

)

I doesn't take me anywhere...

Link to comment
Share on other sites

>>Get(Manusparameter)

Is that the Swedish version of Get(scriptparameter)?

To troubleshoot a script parameter, you can set it to a global in the script:

Set Field [ gCurrentScriptParam ; get(scriptparameter) ]

Then see what got set by the script step. Since you are using Developer, you can step through the script with the debugger to see this. (This is in a script right?)

That aside, your calc could be simplified with:

"evaluation " & get(scriptparameter)

Link to comment
Share on other sites

Ohh, the calc was certainly simplified....

The scriptparameter (yes, manusparameter in swedish) works fine and sets the global field, I also tried to set the global field to "evaluation " & get(scriptparameter) and got the layout name there, perfect. But still, even if I have the samte string in the script, it doesn't take me anywhere....

I then tested to delete the "evaluation " & Get(Scriptparameter) string in the script, then placing the result from the global field in my script, and of course it worked...

Can there be some kind of bug in FM7, maybe the get(scriptparameter) doesn't work when.... you have to many layouts? Shouldn't be a conncetion there but I don't know, can't se the problem. The debugging shows that everything works except the go to layout step, there nothing happens (if I put a ;"evaluation training" in the end after the string I used in the beginning it works).

Link to comment
Share on other sites

Well that's excactly what I'm doing in Dev7v3 Windows XP.

Now something strange happened..... I jumped from writing this post to doing some other work on my solution. Was in the "relation chart", looking through a couple of relations but didn't change anything, when I left the relations where updated (don't they just do that when you have changed a relationship, table, fields etc?).

After that I went through a couple of layouts and at last came to the one causing me problems. NOW IT WORKED !! Don't know why because I havn't changed ANYTHING but I don't care, now I can sleep well tonight!

Thanks for your help Ender.

Link to comment
Share on other sites

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