Basically, I am trying to pull data in from a Chrome tab when conditions are met and a button is manually pressed. Once completed, I close that Chrome tab.
In the same snippet, I am attempting to do this again, but for different variables. Pulling the same type of information but from a different record set.
So far I am able to pull data in from the 1st Chrome tab but when attempting to pull the 2nd set of data from a new Chrome tab the new variables are filled with the old data (from the 1st Chrome tab).
Here is a redacted version of the snippet that will hopefully do a better job at depicting what I am trying to accomplish then I am doing right now...
############################
REPORT INFORMATION
############################
--- Find out if this is a new or an existing report. If new than ask user to input the report number.
NEW/EXISTING REPORT: {formmenu: default=; EXISTING; NEW; name=REPORT}
{if: report="EXISTING"}{formtext: name=REPORT_TYPE_#; cols=20; default=}{elseif: report="NEW"}{formtext: name=REPORT_TYPE_#; cols=20; default=NEW}{else}{formtext: name=REPORT_TYPE_#; cols=20; default=EXISTING}{endif}
REPORT TYPE: {formmenu: IBR; PNUM; OS; FI; OTHER; name=REPORT_TYPE}
############################
PARTIES INVOLVED
############################
--- Find out who is involved and if they are known or not. If involved and known then pull data, if involved and NOT known then ask user to input information.
{formtoggle: name=S_INV; default=no}{formtoggle: name=S_KNOWN; default=no}{endformtoggle}{endformtoggle}
{formtoggle: name=V_INV; default=no}{formtoggle: name=V_KNOWN; default=no}{endformtoggle}{endformtoggle}
{formtoggle: name=W_INV; default=no}{formtoggle: name=W_KNOWN; default=no}{endformtoggle}{endformtoggle}
{formtoggle: name=C_INV; default=no}{formtoggle: name=C_KNOWN; default=no}{endformtoggle}{endformtoggle}
############################
S INFORMATION
############################
--- If 'S_INV' = 'YES' and S_KNOWN ='YES' >pull data,
--- Pulling data from Chrome Tab on site 'https://somepage.org{{^^%2F^^}}*' and then close Tab.
{if: s_inv =""} {elseif: s_inv = YES and s_known = YES}{note: preview=no; trim=left}
Store Basic Information
{srecordNum={site: text; page=https://somepage.org{{^^%2F^^}}*; selector=#handleMain > div.formSectionWrapper > div.clear-right > div:nth-child(1) > div:nth-child(1) > fieldset > div:nth-child(3) > table > tbody > tr:nth-child(1) > td.wrappedText}}
{slastName={site: text; page=https://somepage.org{{^^%2F^^}}*; selector=#handleMain > div.formSectionWrapper > div.clear-right > div:nth-child(1) > div:nth-child(1) > fieldset > div:nth-child(3) > table > tbody > tr:nth-child(2) > td}}
{sfirstName={site: text; page=https://somepage.org{{^^%2F^^}}*; selector=#handleMain > div.formSectionWrapper > div.clear-right > div:nth-child(1) > div:nth-child(1) > fieldset > div:nth-child(3) > table > tbody > tr:nth-child(3) > td}}
{smiddleName={site: text; page=https://somepage.org{{^^%2F^^}}*; selector=#handleMain > div.formSectionWrapper > div.clear-right > div:nth-child(1) > div:nth-child(1) > fieldset > div:nth-child(3) > table > tbody > tr:nth-child(4) > td}}
{sdob={site: text; page=https://somepage.org{{^^%2F^^}}*; selector=#handleMain > div.formSectionWrapper > div.clear-right > div:nth-child(1) > div:nth-child(1) > fieldset > div:nth-child(3) > table > tbody > tr:nth-child(10) > td}}
{endnote: trim=right}{run: sinfo = ""
}{button: sinfo = "yes"
; label=Import sInfo; disabled=no}
{if: sinfo = "yes"}Imported sInfo:
S Record Number: {S_recordNum=srecordNum}{=s_recordnum}
Name: {S_lastName=slastName}{S_firstName=sfirstName} {S_middleName=smiddleName}{=s_lastname}, {=s_firstname} {=s_middlename}
DOB: {S_dob=sdob}{=s_dob}
{endif}{elseif: s_inv = YES and s_known = NO}
--- If 'S_INV' = 'YES' and S_KNOWN ='NO' >enter data manually,
Enter the S Information Manually:
Name: {formtext: name=sln}{S_lastName=sln}, {formtext: name=sfn}{S_firstName=sfn} {formtext: name=smn} {S_middleName=smn}{=s_lastname}, {=s_firstname} {=s_middlename}
DOB: {formtext: name=sdob}{S_dob=sdob}{=s_dob}
{endif}
############################
V INFORMATION
############################
--- If 'V_INV' = 'YES' and V_KNOWN ='YES' >pull data,
--- Pulling data from NEW Chrome Tab on site 'https://somepage.org{{^^%2F^^}}*' SAME SITE BUT
--- DIFFERENT RECORD/INFORMATION.
{if: v_inv =""} {elseif: v_inv = YES and v_known = YES}{run: vinfo = ""}{button: vinfo = "yes"
; label=Import vInfo; disabled=no}
{if: vinfo = "yes"}
Store Basic Information
vlastName={site: text; page=https://somepage.org{{^^%2F^^}}*; selector=#handleMain > div.formSectionWrapper > div.clear-right > div:nth-child(1) > div:nth-child(1) > fieldset > div:nth-child(3) > table > tbody > tr:nth-child(2) > td}
vfirstName={site: text; page=https://somepage.org{{^^%2F^^}}*; selector=#handleMain > div.formSectionWrapper > div.clear-right > div:nth-child(1) > div:nth-child(1) > fieldset > div:nth-child(3) > table > tbody > tr:nth-child(3) > td}
vmiddleName={site: text; page=https://somepage.org{{^^%2F^^}}*; selector=#handleMain > div.formSectionWrapper > div.clear-right > div:nth-child(1) > div:nth-child(1) > fieldset > div:nth-child(3) > table > tbody > tr:nth-child(4) > td}
vdob={site: text; page=https://somepage.org{{^^%2F^^}}*; selector=#handleMain > div.formSectionWrapper > div.clear-right > div:nth-child(1) > div:nth-child(1) > fieldset > div:nth-child(3) > table > tbody > tr:nth-child(10) > td}
; label=Import vInfo; disabled=no}
{if: vinfo = "yes"}Imported vInfo:
Name: {V_lastName=vlastName}{V_firstName=vfirstName} {V_middleName=vmiddleName}{=v_lastname}, {=v_firstname} {=v_middlename}
DOB: {V_dob=vdob}{=v_dob}
{endif}{elseif: v_inv = YES and v_known = NO}
--- If 'V_INV' = 'YES' and V_KNOWN ='NO' >enter data manually,
Enter the V Information Manually:
Name: {formtext: name=vln}{V_lastName=vln}, {formtext: name=vfn}{V_firstName=vfn} {formtext: name=vmn} {V_middleName=vmn}{=v_lastname}, {=v_firstname} {=v_middlename}
DOB: {formtext: name=vdob}{V_dob=vdob}{=v_dob}
{endif}
############################
END
############################
Is this functionality possible? or is there some other way this can be accomplished?
Thanks in advance.