Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Dear all,

I have a problem with doing a script to open a selected layout from another file. I can only open another file, not a layout I want to open. For example I have a choice field in main file, and I use custom list in this field including theory, plant name and I want to open the related layout from another file (datasource file). Data file has 2 layout theory and plant layouts. I can open the data file but not the related layout at all. Can you help me solve this problem? I attach 2 files which I made some scripts but they cannot perform what I need is opening the layout I want in another file.

Thanks and wait for your help.

Snow

myfile.zip

Posted

Hi snow, I'm not sure if this is what you were looking for, but here's what I did:

Created a 'temp_key' field in your main file as well as the other file. It's a text field, with an auto-enter value of one. Basically what it does it allow me to create a relationship between every record in your datasource file back to the main menu.

I created a global field (text) in main called g_layout

Then, for instance I just used the RBC button. I went into that script, and added a set field that set the global equal to whatever value was in your layout choice value list. I also removed the first step of the script which changed the choice value to RBC or whatever.

Then, in your datasource file, I edited the autostart script so it would check the value of the g_layout field (using the relationship set up with the temp_key files). I put in if statements: If g_layout = "theory" then ... goto layout theory.... end if.... If g_layout = "treatment plants" then .... goto layout treatment plants...

----------------

I'm not sure if that's what you're looking for. Basically what I got from your question was you wanted to first select which layout view you want to view it in, and then click whichever button you want to see OF that layout. I could be completely wrong, let me know how it works out!

Posted

The essence of this is: you need a script or scripts in the target file that take you to the desired layout. You can then call those scripts from the main file using Perform Script [External...].

Posted

... so be sure you label your scripts so that you will recognize them when you're selecting them from your current file in ScriptMaker using the Perform Script [External] (datasource file)

(i.e. Go To Layout theory, or Go To Layout plant , etc.)

HTH

Lee

Posted

Dear Dreese,

Thanks for your help. Could you send me your files you edited already? I need to solve the problem soon to submit my advisor this morning and I only have 5 hours to finish it. I cannot go to bed at all. I tried to do as you showed but my heard is heavy now because of staying up too late (4 am already). My email address is [email protected] or you can attach those files on this forum if you feel it's inconvenient to send me email. I really want your help now.

Thanks again

Snow

Posted

Dear Lee and Tom,

Thanks for your help. I made a choice script in ScriptMaker using the Perform Script [External] (datasource file) and I chose the local script in datasource file [Theory (go to layout theory) for subscipt if and Treatment Plants (go to layout treatment plants)] for subscript if but it returned to main file when I perform the choice script. I don't know why. I attach the file again with hope you help me solve this problem. I cannot sleep at all. frown.gif

Thanks again

Snow

file.zip

Posted

Dear Ugo,

Thanks for your help. I put a Refresh(back to front) at the end of the script but it returned to the main file right away after opening the layout I need to see. frown.gif How can I stop the return to main file? Could you help me solve the problem? frown.gif

Thanks

Snow

Posted

Dear Ugo,

It still returned to main file after I put the refresh step in the external script. I can only put the step pause/resume/duration 5 sec after the step go to layout theory in the script theory in datasource but it's not convenient because I have to wait for 5 seconds then it returned to main file right away. It's only a temporary way frown.gif Can you show me another way to do? Will die because of script smile.gif

Thanks again smile.gif

Snow

Posted

Well Snow, I finally download your file :

1. your script for "Treatment Plants" cannot work anyway as you script a If Choice = "Treatment Plant", so you forgot the final "s".

2. you don't need 2 loops. Just one.

3. Set your value list to do not entry into field, as it will be the script that will trigger it to drop down.

4. Put a stop or Halt script step somewhere in your scripts, where you want the script to stop.

5. Make sure you used a Refresh (back to front) script step and not only a "refresh" checkbox from the script go to layout, which is different.

Posted

Go to field "choice" (select)

Loop

End Loop If (Status(CurrentField # "Choice")

Pause/resume 0:00:02

End Loop

If Choice = "Theory"

Perform ext script data source - theory

End If

If Choice = "Plants"

Perfor ext script data souce - plant

End If

and the external script

Go to layout "theory"

End script

Refresh(Back to front)

same for the other script.

Hopes you can get it work.

By the way, I would put a button just behind the choice field, not use the choice field as a button..

Posted

Dear Ugo,

It works well now after I followed what you said.: Another situation is how to make a relationship between process buttons (AS, RBC, UASB) which I put a script for every process and the choice field above so that if I click on the choice 'theory' then I click on those buttons, it will appear every process (reord) on layout Theory and vice versa (Treatment Plants) in case I don't use button (script) on the field choice as you showed me how to do above. Do I have to make a script like choice script for every process button?

Thanks a lot and i feel happy now. smile.gif I can meet my advisor this morning without fear. smile.gif

Snow

Posted

Sorry Snow,

even with the files in front, I don't understand what exactly you need to kno. Relationship ?

What are these buttons doing apart going to a specific layout ?

Posted

Dear Ugo,

These buttons will go to the layout theory or treatment plants in datasource file depends on the choice field. Besides that, these buttons will go to related records of these layouts. I wonder if I can make separeated records in a layout and it will appear whenever I want to show by a script?

Thans for your help!

Snow

Posted

You want the "buttons" to appear in the related file ?

If I catched it, you could use the so well known "Visibility" tip.

Please someone give the link as it is late....bye

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