May 5, 201114 yr Newbies 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
May 5, 201114 yr 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.
May 5, 201114 yr 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.
May 6, 201114 yr 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
Create an account or sign in to comment