Jump to content

perform find not same on Mac and IOS


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

Recommended Posts

Hello i was wondering if anybody could help me , I have created a layout with work notes on it. I have written a script to find only records by name. 

this works fine see enclosed.

There is a status field with two options available  Follow Up and Completed. I wanted Follow up to only show. 

I selected status and sort records descending and this does what i want by putting follow up at the top. 

This would be fine but my problem is on my iphone. The same layout on my mac shows follow ups at the top , The layout on my iphone doesnt even show follow ups ?? only completed .

Both on same layout 

any ideas ? ive tried everything

thanks

 

 

Screen Shot 2015-11-26 at 19.54.58.png

IMG_4477.PNG

IMG_4476.JPG

Link to comment
Share on other sites

Your script is a mess.

Your script (as currently written) makes it difficult for anybody to help you.

Here is your script - rewritten as text; with added comments:

Set Error Capture [ On ]

Set Field [ Follow UP::Sort Selection ]

# that is; set the field Sort Selection to empty.

# Your script does not actually declare WHAT value it is putting into Sort Selection

 

Insert Calculated Result [ Select; Follow Up Sort Selection  ; get( userName)]

# you want to set the sort selection to the user name? OK; why?

# also: why use insert calculated result? 

# also note that the insert command requires the field to be on the layout.

# also note that if the field has script triggers attached to it, the insert command may cause them to fire.

 

Set Variable [ $name ; Followup Sort::Sort Selection]

# why make the set variable statement so difficult?

# why not just Set Variable [ $name ; get( userName)]

# if that is what you are really trying to do

 

Perform Find [ Restore ]

# don't use Perform Find [ Restore] if you are asking anybody to help you

# because we CANNOT help you

# if it is written this way

# because there is ZERO information about what your FIND operation actually does

# instead, use explicit scripted finds

# we have absolutely no idea what your attempted find operation does.

# explicit scripted finds look like this

# notice that PAUSE and RESTORE options are NOT selected for the find command.

 

Enter Find Mode[]

 Set Field [ someField ; someValue ]

Perform Find

 

#ok continue with found results:

 

Sort Records [ Restore; No Dialog ]

Go to Record [ First ]

 

Link to comment
Share on other sites

Thanks for the reply , made me smile as you have probably worked out now that scripting is not my forte :-) 

Ok ive got rid of what you pointed out  and changed the set field to the name field and the name to get username

like so

Set error capture on

Enter Find Mode []

Set Field { Follow Up::Name  : Get (Username)

Perform Find[]

Sort Records [No Dialogue] 

Go to records /request/Page [First}

, it brings follow up to the top of the page followed by all the the completed and it works on my iphone as well

  How do i now get the layout to only show the follow ups ? and omit the completed .

Can i then ask it to do another search on the found set ? 

Link to comment
Share on other sites

There are a couple of ways to do this. It sounds like you really want to do this within one script. 

The example find that described was the simplest form; but you can do slightly more complex things, with multiple criteria, and with the use of Omit Record where applicable.

Set Error Capture [ On ]

Enter Find Mode []

Set Field [ Follow Up::Name  : Get (Username)]

New Record/Request

Set Field [ Follow Up::Status  ; "Completed"]

Omit Record

Perform Find[]

If you want literally want to do a search on a found set, then you are talking about the Constrain Find script step.

Note that this is also available in the menu; and in the contextual commands when you click in a field. Anyway:

Enter Find Mode []

Set Field [ Follow Up::Status  ; "Completed"]

Omit Record

Constrain Find[]

Link to comment
Share on other sites

Thanks for reply , ive tried that but that doesnt get rid of the completed it still shows them all. if i dont have sort fields [Restore] by status field on follow up goes every where  but if i have this on to the status field and sort descending i get follow up at the top and completed below.

Just a note and i dont know why but i have a portal on a dashboard layout to that was showing the follow ups. Now i have nothing.

the portal is set to sort by status descending the i filtered using Follow UP::Name = Get ( UserName ) and Follow UP::Status= "FOLLOW  UP"

thanks for your help i really appreciate it

 

Link to comment
Share on other sites

ok i looked at another copy that i had and the script that i had before was on layout enter 

search criteria was set too the screen shot . then on the layout on the sort selection there is another trigger on modify to run the same script again.

This does the same as your script by bringing follow up to the top and completed down below but on this database the dashboard portal works .

I know its hard to diagnose when you cant see thanks ive included some more screen shots.

 

Screen Shot 2015-11-27 at 06.06.54.png

Screen Shot 2015-11-27 at 06.13.39.png

Screen Shot 2015-11-27 at 06.13.26.png

Link to comment
Share on other sites

Don't know what you expect here.

Not enough information, no file, you show a screen shot with a restored find instead of following the instructions.

Somebody else's turn.

Link to comment
Share on other sites

sorry bruce i sent that  just as you were sending me your last. ill send you over a copy of the file later when i get chance ive got to go work now been working on this since 4 in morning :-) 

Thanks for help

Link to comment
Share on other sites

7 hours ago, baweld123 said:

ok i looked at another copy that i had and the script that i had before was on layout enter 

search criteria was set too the screen shot . then on the layout on the sort selection there is another trigger on modify to run the same script again.

 

You mention two triggers here... if you are not comfortable scripting as you've mentioned then stay away from triggers until you have just the pure navigation and refresh scripts figured out.  Just use a "refresh" button on the layout instead of trying to handle the "onModify" event.

Triggered script will only get in the way at this point until  you have simple scripts that do exactly what you want.  Then you can consider using triggers; but only after a solid understanding of the sequence in which they will fire so that you do not have unintended scripts firing.

This blog post has a demo file that will help you understand those sequences fully:

http://www.soliantconsulting.com/blog/2015/05/filemaker-14-script-triggers

 

 

 

 

Link to comment
Share on other sites

11 hours ago, baweld123 said:

ill send you over a copy of the file later when i get chance ive got to go work now been working on this since 4 in morning :-) 

Thanks for help

That would work. And note Wim's good advice as well.

Link to comment
Share on other sites

This topic is 3021 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.