Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Trim spaces from presentation variable

Received Response
11
Views
4
Comments
Rank 4 - Community Specialist

How do I trim spaces from a presentation variable, entered by user in a prompt? I know how to use the trim function, but not sure where to use the function. Is there a way to add this to the prompt itself, or would I trim in the filter?

Welcome!

It looks like you're new here. Sign in or register to get started.

Answers

  • I would use a SQL filter in the analysis like:

    "Table"."Column" = TRIM(BOTH ' ' FROM '@{Variable}')

  • Federico told you where to use it...

    For your question about "is there a way to add this to the prompt itself" it depends ...

    Do your users write the value of the variable in a text field? If yes you can't really do anything there .... If the users enter the values by selecting in a drop down list you can of course trim the values in the list (but why not trim them in your DB directly?)

  • Rank 4 - Community Specialist

    That works great. Thanks very much, Federico.

  • Rank 4 - Community Specialist

    Yes, it's a text field they are using for input. I do not have access to write to the database directly. Fortunately, considering my current level of skill

Welcome!

It looks like you're new here. Sign in or register to get started.