Want to get rid of Google Ads, click here.
+ Reply to Thread
Results 1 to 6 of 6

Thread: Reinitiazing screen fields and global variables

  1. #1
    Senior Member sigtb02's Avatar
    Join Date
    Feb 2002
    Location
    Québec city
    Posts
    104

    Default Reinitiazing screen fields and global variables

    I am trying to reinitialize dgsig.temp.intervention.prevu and
    dgsig.temp.inter.retour.arriere fields inside of $L.file

    and reinitialize global variable $lo_temps_prevu and $lo_temps_retour.

    This is my script. That does not work.

    var avant = system.vars.$L_file;
    var prevu = system.vars.$lo_temps_prevu="";
    var retour = system.vars.$lo_temps_retour="";
    var avant.dgsig_temp_intervention_prevu="";
    var avant.dgsig_temp_inter_retour_arriere="";

    Any suggestions ?
    __________________
    Is what you're doing now creating the results you really want?

    Maybe it's time to do something different!
    Is what you're doing now creating the results you really want?

    Maybe it's time to do something different!
    .

  2. #2
    Administrator tommy's Avatar
    Join Date
    Nov 2001
    Location
    Copenhagen
    Posts
    4,272

    Default

    To initialize a rad variable you just use this form

    vars.$lo_temps_prevu="";
    Best regards Tommy
    Blog - - ITIL certified - Accredited Integration Specialist – HP OpenView Service Management

    Want to keep this site alive? Consider making a donation. Click here.

  3. #3
    Senior Member sigtb02's Avatar
    Join Date
    Feb 2002
    Location
    Québec city
    Posts
    104

    Default Hi Tommy - Thanks for the reply

    Here is my updated script.

    var avant = system.vars.$L_file;
    var prevu = system.vars.$lo_temps_prevu;
    var retour = system.vars.$lo_temps_retour;
    avant.dgsig_temp_intervention_prevu=XMLDate.getISO Date();
    avant.dgsig_temp_inter_retour_arriere=XMLDate.getI SODate();
    prevu = "";
    retour = "";

    I still have the following error :

    Le panneau de traitement exec.statements de RAD script.execute a rencontré une erreur à la ligne 2 (script.execute,exec.statements)
    Impossible d'évaluer l'expression (script.execute,exec.statements)
    Impossible d'évaluer l'expression (script.execute,exec.statements)
    Mauvais arguments (2) opér. = (script.execute,exec.statements)
    Impossible d'évaluer l'expression
    Is what you're doing now creating the results you really want?

    Maybe it's time to do something different!
    .

  4. #4
    Senior Member sigtb02's Avatar
    Join Date
    Feb 2002
    Location
    Québec city
    Posts
    104

    Default Another method same results

    var avant = system.vars.$L_file;
    var prevu = system.vars.$lo_temps_prevu;
    var retour = system.vars.$lo_temps_retour;
    var maintenant = new Date();
    maintenant.setHours(0);
    maintenant.setMinutes(0);
    maintenant.setSeconds(0);
    avant.dgsig_temp_intervention_prevu=maintenant;
    avant.dgsig_temp_inter_retour_arriere=maintenant;
    prevu = "";
    retour = "";
    Is what you're doing now creating the results you really want?

    Maybe it's time to do something different!
    .

  5. #5
    Administrator tommy's Avatar
    Join Date
    Nov 2001
    Location
    Copenhagen
    Posts
    4,272

    Default

    I am not sure what you are trying to do with this code?

    If you want to set a field in $L.file to a new value you need to do it like this

    vars.$L_file.field_name = value;

    avant in your example is just a copy of $L.file and is only available in the script. By changing avant you are not changing $L.file.
    Best regards Tommy
    Blog - - ITIL certified - Accredited Integration Specialist – HP OpenView Service Management

    Want to keep this site alive? Consider making a donation. Click here.

  6. #6
    Senior Member sigtb02's Avatar
    Join Date
    Feb 2002
    Location
    Québec city
    Posts
    104

    Default Awsome thank for this reply

    This fixes everything - Thanks Tommy.
    Is what you're doing now creating the results you really want?

    Maybe it's time to do something different!
    .

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Bookmarks

Posting Permissions

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