Jump to content

Create a Variable based on a object


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

Recommended Posts

Im trying to create a single script that could send me a mail with a lot of info based on the layout the user is currently on.

For the moment i have like 18 scripts and if i have to make a change i have to change them all!

So now i decidet to create a single script that could handel all layouts.

My idea is to copy from objects set on the layout and past that in globalfields in order to make a $variable. So far so good, it works like a charm and i get all the variables i need!

Untill! a object is empty, then the previous copy will be past into the global and i get the wrong variable!

Iam trying so hard to get a variable direct from a object but so far no progression.

Now i could solve this by emptying my clipboard in the script OR (i like this more) Get a variable direct from a object (the field context)!

Hope you understand and will be able to send me the right direction!

Best regards,

Maarten-Jan

Edited by Guest
Link to comment
Share on other sites

Oeps sorry, this is realy hard for me : and together with my second language english this is almost impossible.

but ill try again.

What i have is a database with about 16 layouts with different types and fields. But i always have a script in order to create a a pdf of the current layout attach it to a mail and send. The way i was working untill now is to make a script for every layout. Due to the problem the field are different in every layout. So i guessed to work with objects. In that way i could make an easy script that is getting his information by OBJECTS set on every layout. but i could not find a way to get a variable out of the objects.

Sorry if still impossible to understand :

Variable.zip

Link to comment
Share on other sites

There are some additional things to learn here. Passing script parameters is an important tool to understand. But in your own script, there were some errors as well.

If you were to use the named object, you do not need to go to it. Instead, set variable $mail; getLayoutObjectAttribute( "mail"; "content")

As it is now, you declared a variable name; but did not set its value to anything. You would want to use get( activeFieldContents ) at this point in your existing go to object select all script.

Edited by Guest
Link to comment
Share on other sites

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