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

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

Recommended Posts

Posted

Is there any way to choose a path (other than Desktop, etc.) with a dialog and have the path written to a script variable or a field? I know that i can hard code the path in a field, but it would be nice to be able to select it as needed from a dialog.

Yes, there is. Script a process where the user is selecting a file to insert into a global container field. Once they have done that, you will be able to retrieve the full path to the selected file by using GetAsText(GlobalContainerField), parse the path (everything but the file name) and place the result into a text field, then clear the global container.

Not quite as neat as the job you can do with some of the 3rd party plug-ins (because you cannot select an empty folder by this method) but workable. :

Posted

Yes, there is. Script a process where the user is selecting a file to insert into a global container field. Once they have done that, you will be able to retrieve the full path to the selected file by using GetAsText(GlobalContainerField), parse the path (everything but the file name) and place the result into a text field, then clear the global container.

I'll give this a try! May even be able to write a custom function for the parsing.

Thanks!

Posted

I was excited about variables until I actually tried to use them today. I want to capture the input from a custom dialog to variables instead of temp global fields. It doesn't look like that's possible (not without capturing to a global and then setting the variable to the contents of the global, which seems... counter-productive). Am I correct here?

On the other hand, it does appear you can use variables with the Troi plugin -- instead of using a Set Field step to display the dialog you can use Set Variable; the variable will be set to the dialog result.

Posted

Stephen,

Can global variables be displayed on a layout?

I am getting a date range and storing in a variable and want to display it at the top of my report.

Thanks in advance for your help.

FM Forums is a great resource. :

Posted

Can global variables be displayed on a layout?

I guess Stephen is busy. :

The answer to your question is no, not directly.

It can be done indirectly - eg if you set up an unstored calculation field that references the global, you could include that on the layout (either as a field box or in a merge field). Or alternatively, you could script the placement of the variable into a field (eg a global field).

However depending on what you're trying to achieve (and why thinking of using variables), it may just be simpler to just put the value directly into a field in the first place...

Posted

As I found, it's not possible to display variables on layouts by themself. If you store the value of variable to the field placed on layout, then it works out. I'm not pleased with this solution because have expected variables being same or similar as they are in other script languages such as php.

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