# Creating System Variables

**URL:** <https://forums.eggplantsoftware.com/t/creating-system-variables/7752>\
**Category:** Eggplant Functional\
**Tags:** data-driven, excel, eggplant-functional\
**Created:** [February 16, 2022, 10:38pm UTC](https://forums.eggplantsoftware.com/t/creating-system-variables/7752 "2022-02-16T22:38:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ScottyD](https://forums.eggplantsoftware.com/user_avatar/forums.eggplantsoftware.com/scottyd/32/167_2.png) [@ScottyD](https://forums.eggplantsoftware.com/u/ScottyD)\
**Post date:** [February 16, 2022, 10:38pm UTC](https://forums.eggplantsoftware.com/t/creating-system-variables/7752/1 "2022-02-16T22:38:45Z")

</div>

I’ve added myExcelDb to a variable we’ll call myData that holds 75 columns with header info  
{URL: “[myEnvironment.com](http://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](http://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

---

<div class="post-metadata">

**Author:** ![DaveHester](https://forums.eggplantsoftware.com/user_avatar/forums.eggplantsoftware.com/davehester/32/104_2.png) [@DaveHester](https://forums.eggplantsoftware.com/u/DaveHester)\
**Post date:** [February 16, 2022, 11:11pm UTC](https://forums.eggplantsoftware.com/t/creating-system-variables/7752/2 "2022-02-16T23:11:08Z")

</div>

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

```auto
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:

```auto
{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 = (); }

```

---

<div class="post-metadata">

**Author:** ![Rajat1981](https://forums.eggplantsoftware.com/letter_avatar_proxy/v4/letter/r/71c47a/32.png) [@Rajat1981](https://forums.eggplantsoftware.com/u/Rajat1981)\
**Post date:** [February 18, 2022, 8:08pm UTC](https://forums.eggplantsoftware.com/t/creating-system-variables/7752/3 "2022-02-18T20:08:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![DaveHester](https://forums.eggplantsoftware.com/user_avatar/forums.eggplantsoftware.com/davehester/32/104_2.png) [@DaveHester](https://forums.eggplantsoftware.com/u/DaveHester)\
**Post date:** [October 18, 2022, 1:56pm UTC](https://forums.eggplantsoftware.com/t/creating-system-variables/7752/6 "2022-10-18T13:56:47Z")

</div>

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.
