Skip to Content
author's profile photo Former Member
Former Member

Clean up multi-valued parameter data (append spaces) for record selection

Hi Everyone,

I have id info that is stored in the db as a string, and with leading spaces, like this

"      2120"

. However, the input variables will be numeric string or numbers, either "2120" or 2120. The field is always 10 characters including spaces.

How do I collect the Part Numbers from the user (as parameters) and then convert those parameters to the required format for the DB?

So far I'm able to do this for 1 part number , just not a multi-valued parameter full of them.

f_InputPartNumber =

stringvar InputPartNumber:= "2120"

f_AppendPart =

if length({@f_InputPartNumbers}) <= 10 then 

space(10 - length({@f_InputPartNumbers})) + {@f_InputPartNumbers}

else {@f_InputPartNumbers}

Record Selection Formula: =

{V_MISP1.MI_PART} = {@f_AppendPart}

Thanks for your tips,

😊 John

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Dec 07, 2011 at 07:44 PM

    Hi John,

    Or you can create a record selection formula like this:

    Trim(Id_Info) = {?Parameter_Name}

    -Abhilash

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 07, 2011 at 07:36 PM

    Hi John,

    Any reason you can't use something like:

    Trim(ID_Info) as ID_Info on the query you create

    for your report. Then you can just make a string parameter and

    let the user enter the 4 numeric characters.

    Thanks,

    Jimmy

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.