Forum Discussion

sdayringer's avatar
sdayringer
New Contributor III
3 years ago

Book Filename with Variables

What do I need to add to our book settings in order to get the file to export with variables within the filename? For example, I'd like our consolidated financial book to save as the time defined in the parameter as "2022M10 Financial Statements.pdf."

  • PaulaMihalko_CS's avatar
    PaulaMihalko_CS
    New Contributor III

    Can you share the setup of the Book? And how are you planning to run the book?

  • sdayringer's avatar
    sdayringer
    New Contributor III

    See setup above. The pdf is generated from the OPEN ALL IN PDF button.

     

    • PaulaMihalko_CS's avatar
      PaulaMihalko_CS
      New Contributor III

      Thank you for sharing that information.

       

      You could create a "shell" book which is a .zipbook, which contains your .pdfbook, and provide the Output name there; in this instance I used the substitution variable |WFTime|

      When run, the zip file will open with the PDF file named accordingly:

       

      Hope that helps!

  • sdayringer's avatar
    sdayringer
    New Contributor III

    Looks like I can't enter my period parameter (|P_PeriodPrompt|) as it says there are illegal characters, if I enter |WFTime| or |CVTime| is processes the file, but it doesn't tie to the selected time parameter....I also get an error when trying to open the extracted pdf file

     

     

     

     

    • JackLacava's avatar
      JackLacava
      Honored Contributor

      Chances are that that parameter contains characters like / or :, which might be breaking things somewhere. You might want to wrap that into an XFBR that sanitizes it.

  • sdayringer's avatar
    sdayringer
    New Contributor III

    I'm still getting the illegal characters error... but not sure if I setup or am using the XFBR rule correctly... I've tried replacing "BRString" with "XFBR" as well as taking the exclamation points out in the parameter...

    DASHBOARD XFBR STRING BUSINESS RULE:

    BOOK SETUP:

     

    ERROR:

     

    ERROR DETAILS:
    Source code: WcfRetryManager.cs, line 279, method ExecuteRetries.
    .
    Source code: WcfRetryManager.cs, line 351, method ExecuteRetriesStartingWithPreferredAppServerIndex.
    .
    Source code: WcfRetryManager.cs, line 483, method TryExecuteAction.
    .
    Source code: FileSystemWcf.cs, line 419, method GetFile.
    .
    Source code: FileSystemWcf.cs, line 563, method GetFileStream.
    .
    Source code: ExtensibleDocumentsWcf.cs, line 543, method ConvertStringsInFileUsingSubstitutionVariables.
    .
    Source code: ExtensibleDocBook.cs, line 274, method ConvertStringsInFileUsingSubstitutionVariables.
    .
    Source code: ExtensibleDocBook.cs, line 332, method ConvertStringsInFileUsingSubstitutionVariables.
    .
    Source code: XFLoopProviderHelper.cs, line 241, method RecursiveProcessChildItems.
    .
    Source code: XFLoopProviderHelper.cs, line 393, method RecursiveProcessLoopProviderItem.
    .
    Source code: ExtensibleDocBook.cs, line 474, method OnLoopProviderProcessItem.
    .
    Source code: ExtensibleDocBook.cs, line 698, method GetDashboardPrintItemForFile.
    Illegal characters in path.

    User Interface Stack Trace:

    Server stack trace:
    at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
    at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
    at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
    at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    Exception rethrown at [0]:
    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    at OneStream.Client.SharedUI.FileExplorerServiceReference.FileExplorerService.GetFileData(SessionInfo si, FileSystemLocation fileSystemLocation, String fileFullName, Int32 maxFileSize, Boolean processExtensibleDocument, Boolean convertToPdf, Dictionary`2 customSubstVars)
    at OneStream.Client.SharedUI.FileLauncher.ProcessAndLaunchFileSystemFileUsingWPFClient(SessionInfo si, FileSystemLocation fileSystemLocation, String fileName, Boolean processExtensibleDocument, Boolean convertToPdf, Dictionary`2 customSubstVars, FileLaunchType fileLaunchType) in C:\agent\_work\606\s\Source\Client\Windows\ClientWindowsSharedUI\FileSystem\FileLauncher.cs:line 608