Jump to content
Macro Express Forums

Passing ME values in External Script


Recommended Posts

Hi,

 

I've capture some values from user in ME variables. I'm passing these values to External Script variables so that the same can be entered to a specific field in an application(by using the IE.document.getElementById).

 

I'm not sure why it is not passing the ME value in ES script ?

 

ME script

 

Variable Set String %Cmmt% to "Did you check the Patient Name on CL : %Pat_Name%

 

Did you check the Legal Entity from COC : %Leg_Ent%

Did you check the Emp Name and Address : %Emp_Name%

Did you check the Group name and Number : %Grp_Name%

Did you check the DOS : %DOS%

Did you check the claim amount and service type : %Clm_Amt%

Did you check the summary statement as per the appeal FLN : %Sum_Stat%

Did you mentioned the correct copay, coins and ded as per plan : %Copay%

Did you copy and paste the benefits direct from the COC : %Ben%

Did you resolve all the issue of appeallent by adding the standard
language : %Stan_lan%

Did you check the second level rights from Section 6 of the COC : %Second_Level_Right%

Did you check second level Hearing / Review : %Hear_Rev%

Did you check the limit for the expedited appeals from section 6 of the COC : %Exp_App%

Did you check ERISA rights from the COC : %ERISA%

Did you check the appeant party member / provider : %Mem_Pro%

"

 

External script

 

'Option Explicit

Dim IE
Dim cmmt
Dim URLFound
Call Look_For_URL
If URLFound = True Then
IE.Visible = True
cmmt = %cmmt%
'objIE.Refresh()
IE.document.getElementById"ETSMaster_MainContentPlaceHolder_ETSComments_cboCommentType_ETSddlStd").Value = 9
IE.document.getElementById("ETSMaster_MainContentPlaceHolder_ETSComments_txtComment").Value = cmmt

End If

 

 

Regards,

 

Gagan

Link to comment
Share on other sites

When you declare a variable with Option Explicit I'm pretty sure you need to define type. EG "Dim cmmt as String". At least you need to do that in VB.Net. And it's always a good habit to get into. ALWAYS define your types. But that shouldn't effect this.

 

You don't need a variable in this script. Where you have cmmt you can and should use a literal string. EG "IE.document....Value = cmmt" should be "IE.document....Value = "%cmmt%"". Note you use quote marks around literal strings. Again this shouldn't affect how this functions.

 

I don't see how this would work but then again you're presumably not including the function "Look_For_URL". But even then I don't see how this code would work. I don't see you creating objects here. Like getElementById should return an element collection. IE "Dim MyElementCollection = IE.document.getElementById". But maybe there's something different about the syntax in VBScript. But this doesn't look right to me and I think you should create this as a VBS file and try to execute it manually as I have explained before.

 

In you macro right before this create a variable named ScriptText and set it exactly the same as what you have in the external script command. Then save that variable to a text file MyTestScript.vbs and put an abort command right after that. Now inspect that file. You should see %Cmmt% replaced by the text the user entered. Assuming it is correct execute MyTestScript.vbs manually and see if it works. I'm guessing you will get debugger errors.

 

With External Script I always write the scripts in a text editor or development application. Once it's working perfectly I would then go in and remove the variable and replace the literal text with the MEP variables.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...