Jump to content

Find/Sort from popup menu?


weststreet
 Share

This topic is 5715 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi,

I have a field that gives the user a choice of finding their jobs based on what they select from the field...

Today

Tomorrow

2 Days

3 Days

Then I made a button that starts a script to find and sort the records that ship "Today", (or whatever other choice they made). I tried to do an "if" in the scriping window to accomplish this, but it's not working as I'd hoped.

Am I going in the right direction, or am I missing an easy solution???

Thanks!

Mark

Link to comment
Share on other sites

You would need a global field that has the pull down menu on it. I called it gDateChoice.

Then in your script, you can script something like this.

If [ Jobs::gDateChoice = "Today" ]

     Enter Find Mode []

     Set Field [ Jobs::JobDateField; Get ( CurrentDate ) ]

Else If [ Jobs::gDateChoice = "Tommorow" ]

     Enter Find Mode []

     Set Field [ Jobs::JobDateField; Get ( CurrentDate ) +1  ]

Else If [ Jobs::gDateChoice = "2 Days" ]

     Enter Find Mode []

     Set Field [ Jobs::JobDateField; Get ( CurrentDate ) +3  ]

Else If [ Jobs::gDateChoice = "3 Days"]

     Enter Find Mode []

     Set Field [ Jobs::JobDateField; Get ( CurrentDate ) +3  ]

End If

Perform Find []



Link to comment
Share on other sites

This topic is 5715 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.