Results 1 to 5 of 5

Thread: Vars Predefined

  1. #1
    Join Date
    Nov 2013
    Posts
    6

    Unanswered: Vars Predefined

    Hi all,

    I need help, I have downloaded Brilliant Database 'log_date_time' example. I have created my own on my DB database but I cannot see where or how to create the 'Vars Predefined' that appear in the example file 'log_date_time'. Thanks in advance.

    I have attached a screen shot of the 'log_date_time' example file with the area in question in the red box.

    Click image for larger version. 

Name:	Vars Predefined.png 
Views:	13 
Size:	17.4 KB 
ID:	17195

  2. #2
    Join Date
    Jul 2014
    Posts
    24
    Provided Answers: 1
    Predefined. A predefined variable is a local variable, but unlike local variables it's defined before the script is executed. For example, the arguments of User Functions or variables given to the script after parsing are predefined variables.

    Read the User Function help - below is an excerpt from that help:

    User Function Properties

    Name - specify the function name;
    Argument Name (1, 2, 3) - specify names of arguments where input variables will be recorded;
    Description (1, 2, 3) - argument description;
    Function returns value) - select this check box if you want the function to return its value. You can use the text box on the right to describe the value.

    If you change the User Function properties as shown on the illustration, predefined variables will appear in the script tree of the UF editor:

    You should record the result of the User Function to the [$result] variable at the end of the script.

    Bill

  3. #3
    Join Date
    Nov 2013
    Posts
    6

    Thanks Bill

    I have read through the help section but it doesn't make sense. I have tried different variables but nothing appears under the 'Predefined' heading.

    I have created a log to record entries which is the way I want it, but each entry over writes the previous entry, so no new line is appearing in the log itself.

    Thanks for your comment.

    Shaun

  4. #4
    Join Date
    Jul 2014
    Posts
    24
    Provided Answers: 1
    I do not think you can directly create a predefine variable. Look at the date_ops in the tutorial.

    This formula:

    dateAdd([some_date],[shift_days],|Day|)

    creates the predefined variables of some_date, shift_days

    Somehow the system decides that a local variable is now a predefined variable. It is not just a user defined function that does it. If you parse the variable that will also create a predefine variable.

    Bill

  5. #5
    Join Date
    Nov 2013
    Posts
    6

    Thanks Bill

    I have solved the problem. Slightly different method to the example I download from the brilliant database website but it works the same way so I'm pleased it works.

    Thanks for your comments.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •