Commit e92d5633 authored by mseng3's avatar mseng3
Browse files

Update build-software-string.ps1

parent 170b6671
...@@ -24,17 +24,12 @@ foreach($software in $availableArray) { ...@@ -24,17 +24,12 @@ foreach($software in $availableArray) {
} }
# Build the string of selected software # Build the string of selected software
$softwareString = "" $softwareString = $selectedArray -join ", "
foreach($software in $selectedArray) {
$softwareString = "$softwareString $($software)," # Use a default string if no titles were selected
} if($softwareString -eq "") {
# If at least one title was selected, remove trailing comma from $softwareString
if($softwareString -ne "") {
$softwareString = $softwareString.Substring(0, ($softwareString.length - 1))
}
# If no titles were selected
else {
$softwareString = "none selected" $softwareString = "none selected"
} }
# Save the string to a TS variable # Save the string to a TS variable
$tsenv.Value('EngrIT_SelectedSoftware') = $softwareString $tsenv.Value('EngrIT_SelectedSoftware') = $softwareString
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment