Creating System Variables

I’ve added myExcelDb to a variable we’ll call myData that holds 75 columns with header info
{URL: “myEnvironment.com”, userId: “Teddy”, addr1: “100 Main St”, addr2: “”, addr3: “”, City: “Austin”, State: “TX”, etc…}

set myExcelDB to table (“worksheet1”) of {type:“excel”, file:(ResourcePath(“myExcelFile.xlsx”))}
put the first record of myExcelDB into myDATA
set the suitevariables.SuiteTranasactionData to the records of myData

mySuiteInfo.file
{EPVersionNumber = X; Schedules = (); ScriptMetaData = {}; SuiteEncodedTextKey = “X”; SuiteVariables = “{
SuiteTranasactionData:{
acctnm:@”",
addrln1:@“100 Main St”,
addrln2:@"",
addrln3:@"",
city:@“AUSTIN”,
comments:@"",
country:@“USA”,
state:@“TX”,
url:@“myEnvironment.com”,
userid:@“Teddy”
}
}"; helpedSuitesInfo = (); helperSuitesInfo = ({filePath = “./win_common.suite”; }); }

I’m getting an error and then I can’t open the Session window. I don’t think ePF likes a list inside the SuiteTransactionData variable. ¯_(ツ)_/¯ In order to get back in to the Sessions window I have to delete the SuiteInfo file. Am I correct in this thinking?
If so, is there an easy process to take the individual properties in myDATA and add them to SuiteTransactionData as independent SuiteVariables using their headers as the variable name?

Key Value
state TX
city AUSTIN

1 Like

Looks like a simple change of syntax is all that is required.

set myConnectionString to {type:excel,file:ResourcePath("data_Reg-1.xlsx")}
put the first record of myConnectionString into myData
set the SuiteVariables to myData

The resulting SuiteInfo file looks like this:

{EPVersionNumber = 2108312007; Schedules = (); ScriptMetaData = {}; SuiteEncodedTextKey = "123456789"; SuiteVariables = "{
 address:@\"\",
 citizen:@\"\",
 dob:@\"110190\",
 email:@\"\",
 emergencycontactname:@\"\",
 emergencycontactrelationship:@\"\",
 ethnicity:@\"\",
 firstname:@\"Michael\",
 gender:@\"M\",
 guarantoremployer:@\"\",
 guarantoremploymentstatus:@\"\",
 guarantorname:@\"\",
 guarantorrelationship:@\"\",
 homephone:@\"\",
 insuranceid:@\"\",
 insuranceplan:@\"\",
 insuranceplanname:@\"\",
 intendedscript:@\"\",
 language:@\"\",
 lastname:@\"Eggplanttest\",
 maritalstatus:@\"\",
 mobilephone:@\"\",
 mrn:@\"\",
 needsinterpreter:@\"\",
 patientemployer:@\"\",
 patientemploymentstatus:@\"\",
 patientname:@\"Eggplanttest, Michael\",
 patienttype:@\"\",
 pcp:@\"\",
 pronoun:@\"\",
 race:@\"\",
 recnumber:1,
 religion:@\"\",
 rte:@\"\",
 scratch:@\"\",
 ssn:1e+009,
 veteranstatus:@\"\",
 zipcode:@\"\"
}"; helpedSuitesInfo = ({filePath = "../AI Suites/CertificationForAI.suite"; }, {filePath = "CertificationForAI.suite"; }, {filePath = "Certification/CertificationForAI.suite"; }); helperSuitesInfo = (); }
1 Like

i hope, this help you

Function GetExcelValues excelFileName , ColumHeaderList, RowNumber

set Inputdatadb to (type: "excel", file: ResourcePath(excelFileName))


put the records of Inputdatadb into Listvalues_NPL

	
put item RowNumber of  Listvalues_npl into RowValues_pl


Repeat with each item TextValue of ColumHeaderList
	
	
	insert [RowValues_pl.(TextValue)] after CellValueList

	
End repeat

return CellValueList

end GetExcelValues

It appears that two solutions were posted. Please post a sample of your code for review so that the community can better understand the nature of your issue.