Clean up UserResponse

Hi everyone! i’m a newbie at this and don’t even know if it is possible or not, but i would like to try to clean up a UserReponse that i have. my UserResponse is

=UserResponse(“Enter value(s) for Month Desc:”)

and it works great but when a full year is entered, it looks a little crowded.

Jan FY2010;Feb FY2010;Mar FY2010;Apr FY2010;May FY2010;Jun FY2010;Jul FY2010;Aug FY2010;Sep FY2010;Oct FY2010;Nov FY2010;Dec FY2010

is there a way to write this so that if more than one month is included, the end result would just show the first - last months?


putzhead (BOB member since 2007-08-21)

Hi,

In this case, I would try either (BETWEEN) or (FROM DATE OBJECT > “Prompt1” and TO DATE OBJECT < “Prompt2”) construct and design the query around that.

Just a pointer.

Cheers.


BO_Stuffed (BOB member since 2008-03-29)

Your other option is to create max and min month objects for the data returned - obviously if there’s no data in January, it will say February, but it’s going to be easier.

Just a thought for you to consider.

Regards,
Mark

The problem with trying to “clean up” a prompt is you have no idea what order the values are in. They could be as you typed them here:

Jan FY2010;Feb FY2010;Mar FY2010;Apr FY2010;May FY2010;Jun FY2010;Jul FY2010;Aug FY2010;Sep FY2010;Oct FY2010;Nov FY2010;Dec FY2010

Or they could be like this:
Apr FY2010;Dec FY2010;Aug FY2010;Mar FY2010;…Oct FY2010;Sep FY2010;

So the suggestion to pull the min / max values from the data is probably the best choice.


Dave Rathbun :us: (BOB member since 2002-06-06)

i tried to use Min and Max but for some reason, it skips a month. for example, if i pull in Jan, Feb, Mar, Apr, the Min shows up as Feb and the Max shows up as Mar. i do know for a fact that there is data for every month. what am i doing wrong?


putzhead (BOB member since 2007-08-21)

It’s doing a min / max based on character comparison. Feb < Jan from an alphabetical perspective. :slight_smile: Can you convert the value into a date and go from there?


Dave Rathbun :us: (BOB member since 2002-06-06)

i just realized what it is doing. it is taking the min and max as alphabetical order. Min for Jan, Feb, Mar, Apr, is showing Apr and Max is showing Mar. is there a way i can fix this?


putzhead (BOB member since 2007-08-21)

You could try with tagging “01-” to the start of each month and converting them to date and then playing with FormatDate to convert back the Min and Max values.

i just realized what it is doing. it is taking the min and max as alphabetical order. Min for Jan, Feb, Mar, Apr, is showing Apr and Max is showing Mar. is there a way i can fix this?


putzhead (BOB member since 2007-08-21)