Method Community

 

Writing Script

Last post 01-15-2014 9:45 AM by Method_Greg. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-14-2014 11:02 AM

    Writing Script

    I'm trying to write a script and assign it to an action result in order to retrieve a value from a table.  I have 4 criteria, and I'm not sure how to enter script that references a value on the screen.  This is what I have:

    (AssignedTo = 'Users.UserName') And (ActivityStatus='Not Completed') AND (ActivityType like '%Send Termination Letter%') AND (Entity = 'Screen.Client Name:')

    I want the Entity field in the table to equal a value on the screen, and apparently I don't have it done correctly.  Can someone review the script to make sure it's done correclty and  help me out with the entity/screen value issue?

    Thanks!

    Ben

  • 01-14-2014 7:16 PM In reply to

    Re: Writing Script

    Ben,

    Do I understand you are trying to retrieve a value from a table by writing a script so you can display a field in a grid that is not found in the table you have open in the Grid?

    If so I am very interested in what you are trying to do as it would help me solve a number of problems that I am chasing around.

    I am not comfortable with script but am willing to learn.  Would you be willing to share the script you have written to retrieve a value from a table.  If so would you have time for a quick phone call?

    Also any recommendations on a good source for wrting script?

    Stuart

    Stuart Katz
    Noggin Builders
    Let your children come explore the wonders!
  • 01-15-2014 8:33 AM In reply to

    Re: Writing Script

    Hello Ben,

       Can I confirm, you are using Retrieve Value From Table action with an Action Result that contains your search/SQL command?

        I can look into getting values from screen as I am not sure myself.  I see you tried Screen.ClientName.    There is a webinar we have on SQL and Retrieve values that may help.

    - Greg

    Greg Bilous
    Community Support Specialist
    Method Integration
    g.bilous@method.me
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400 ex.756
    Fax: 416.640.6027
  • 01-15-2014 9:45 AM In reply to

    Re: Writing Script

    H the texello,
       I found out how one can use values off of the screen.  It is using the Character Function and the Replace characters function.  I'll try to explain how it will work.  
        First, Take your SQL command and for the Screen.ClientName section, replace it with something you can identify.  Try the text REPLACE.   Second, have an Action Result theat retrieves a value from the screen.  Third, create a Character function action.  In your Character Function, select your SQL Action Result and use Replace characters.  Use 'Type In' selection and REPLACE for the replace characters and replace it with your Action Result that contains the screen value.  Lastly, save it back into your SQL action result.

        In essence, use a Character Function with an action result containing the screen value.

    - Greg

    Greg Bilous
    Community Support Specialist
    Method Integration
    g.bilous@method.me
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400 ex.756
    Fax: 416.640.6027
Page 1 of 1 (4 items)