Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

  • Newbies
Posted

I have a script that finds sales based on date or salesman or both with search string done via custom dialogue input fields.

I would like to sort by salesman and date if both fields are inputted, but only by date if only date is queried.

Is there a script step that would allow me to determine whether one of the search fields is empty?

Thanks

ken

Posted

If you are using a custom dialogue for your criteria input, then you know if they've specified a date or salesperson or both. So, your Find script can branch accordingly. Perhaps I've missed something...when you say custom dialogue, what do you mean? To me it means a layout that the user is taken to at the start of your script. This layout has two global fields, a date field and a text field.

Posted

I have a script that finds sales based on date or salesman or both with search string done via custom dialogue input fields.

I would like to sort by salesman and date if both fields are inputted, but only by date if only date is queried

If( IsEmpty( salesman ))

  Sort(by date)

Else

  Sort(by both)

End If

Don't forget that FileMaker custom dialogs are really dumb: the input fields are only processed if the user clicks the default button.

Posted

If I read this correctly, the custom dialog is presented in Find mode. So it should go something like:

Enter Find Mode[]

Show Custom Dialog [...]

Set Variable [ $s ; not IsEmpty [ YoutTable::Salesman ]

Perform Find[]

If [ $s ]

  Sort [by both]

Else

  Sort [by date]

End If

This topic is 4951 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
×
×
  • Create New...

Important Information

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