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

Thread: Where to put and do javascript to controll field

  1. #1
    Junior Member
    Join Date
    Mar 2008
    Posts
    2

    Default Where to put and do javascript to controll field

    Hi all.,
    i am new of service center.i hope you can help me.
    I must do a javascript that must controll one filed put by user and verify that there is' not in the every record (about 90 record) in the probsummary table...
    i read there are many method..
    one is to do a script in libraryscript and call it or to put my script in the space javascript o calculation in the form design...
    i read a similar script in the guide with the use of function doSelect.
    How caN I pass parameter that every time change valor(pass by user)?
    And can tell like mi script must be and where i put it?
    Thakns a lot

  2. #2
    Senior Member mateuszk's Avatar
    Join Date
    Nov 2006
    Posts
    302

    Default

    Just a hint:

    I believe you should look into "event services"
    but be prepared, it doesn't always work as expected :-)

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

    Default

    Event services is mainly used for integrations with external systems.

    If I understand correct you want the user to enter a unique value into a field. This value must only exist in one incident ?
    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.

  4. #4
    Senior Member mateuszk's Avatar
    Join Date
    Nov 2006
    Posts
    302

    Default

    I've got a feeling I'm not getting the main thought behind this question.
    frapin, care to clear this up for us?

    tommy, I was actually thinking about "display events" in my post,
    sorry for confusing things even more.

  5. #5
    Senior Member tuncay's Avatar
    Join Date
    Jul 2004
    Location
    Germany
    Posts
    113

    Wink possible solution

    When you enter an value in an field an want to validate is on save or add etc. You can put a javascript function in the javascript portion of the formatcontrol and set the right action to true or not null(field).
    In this javascript you can make an select against probsummary with this field value. When you get resullts like rc = f_probsum.doSelect(....) == RC_SUCCESS then you can set a thread variable to true ($exist=true).
    In your validation portion of the formatcontrol you can control with this variable your validation rule

  6. #6
    Senior Member pfilaretov's Avatar
    Join Date
    Jan 2009
    Location
    St.-Petersburg, Russia
    Posts
    113

    Default

    Quote Originally Posted by tuncay View Post
    When you enter an value in an field an want to validate is on save or add etc....
    When you get resullts like rc = f_probsum.doSelect(....) == RC_SUCCESS...
    And what is in the doSelect() function as parameter? How you get the field value that user have entered?

    I answering because I have problem with getting field value user have entered:
    How can I get the value (from the field) that user have entered?
    I want to get it after clicking some button. On the clicking this button in the Display Option I can save the field's "Input" (e.g. 'testField in $file') in some other variable (e.g. '$G.testVar') but this value will be the last recorded value, not the value user have entered by hands!
    Last edited by pfilaretov; 2009-01-14 at 10:41.

+ 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