Hey folks,
I managed to do an Application update and limit mass updates by shutting down the command tree and giving a 'mass update' button with access levels... which is great, but now I have staff who need access to Exports ... without opening the command tree up again.
I tried building a mass update to run the exports, and I think this should work, except I keep getting the error 'ASCII Export Failed To Create File'. Am I missing something?
#include "sbasic_include.sbas"
stat vSpecList as String
stat vSpec as String
stat vResult as String
stat vDestination as String
stat vRun as int
vSpecList = @SpecCommand(6, 3, "") // Get a list of saved Export specs
vSpecList = @SortStringArray(vSpecList, 0) // Sort them
If vSpecList = "" // Make sure there is at least one spec to show in popup list
@MsgBox("No saved Mass Update specs found!", "", "(HINT: Save one first)")
Else
{
vSpec = @PopupChoiceList(vSpecList, "CHOOSE AN UPDATE") // Display the list of specs
vDestination = @PromptForUserInput("EXPORT DESTINATION?",".\export\" + DBCltNo + "-" + @num(@serverdate())+".csv")
If vSpec <> "" // Make sure a spec name was selected
{
vRun = @LoadExportSpec(vSpec)
RunExportSpec(vDestination, "", "", 0, 0, 0, 0, 0, 0, 0, 1)
}
}