Jump to content

Recommended Posts

Hi Guys, 

I have a Script running a calculation for a Find. 

The table is in essence as follows

Item Percentage Find Field

My Script/Calculation is as follows: 


Enter Find Mode [Pause: Off]

Set Field [Percentage ; Percentage ≥ Find Field ]

Set Error Capture [On]

Perform Find [ ]

Sort Records [Restore ; With dialog: Off]

Go to Record/Request/Page [First] 


I have an identical Script with text relating to the item. This works perfectly. 

For some reason the calculated field isn't. 

The input for this Find Field is entered as a decimal number (the setting of the the field turn it into a percentage). So if I am looking to find ≥ 10% I would enter .1 into the Find Field. 

When running the script, I am getting blank, with no matching records - despite the fact I know there are records higher than 10%. 

Am I doing something obvious wrong? I've also tried Find Field ≥ Percentage, but getting the same result - with no records matched. 




Link to post
Share on other sites

If Find Field is a global field*, and you are trying to find records where percentage is greater than or equal to the value entered in Find Field, then you need to do:

Enter Find Mode []
Set Field [ YourTable::Percentage ; "≥" & SomeTable::Find Field ]

Otherwise I have no clue what you're trying to do here.


Note that your expression =

Percentage ≥ Find Field

is a Boolean expression; it will return a result of either 1 (true) or 0 (false).


(*) Only global fields have values in Find mode.



Link to post
Share on other sites

Thank you. As always the advice is spot on. 

I need to learn scripting better! It was the fact that I didn't have the "" and the &.... so it worked in my mind. 

Also, correct on Global Field. I created the Field as a Global Field, for the purpose of searching only. 

Thanks as always :)

Link to post
Share on other sites

You don't need to create global fields in that table, you can use a dedicated table just for global fields and keep your schema 'clean'.  Plus if you are capturing the user's input for what to search on, you can use variables

Link to post
Share on other sites

You also may want to adopt a naming convention for your fields so that you can tell whether they are global or not.  That makes it easier to read your code and interpret it.  Plus your future self will thank you for it.

Link to post
Share on other sites

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
  • Similar Content

    • By tomp
      I'm having a problem getting BE_SMTPsend to successfully send an email with an attachment.
      No problem sending without an attachment, but when I add an attachment, I get an error 2 (not sure exactly what that means, but without the attachment, no error)
      These are the argument strings with and without attachments:

      I have tried both relative and direct file paths for the variable $attachment. Examples are:

      Both of them return an error code of 2.
      Since the 'send' without an attachment works, all the values of the fields/variables other than $attachment must be valid.
      Can anyone offer a suggestion as to what might be going on and what I might try to resolve this?
    • By Msaeed
      Hi All,
      As per mentioned on topic, in fact i would like to create icon ex. hour in case rigging guard the insert time.

    • By Solvax
      I'm trying to make a subsummary report with data from the current table and a related table.
      I never get to display the correct totals for the related table, and would therefore appreciate your help.
      First I'll try to explain the workflow:
      I have two tables called 'Voorraad_uit' (= outgoing stock) and 'Voorraad_in' (= incoming stock) which are related by delivery number.
      Data is first entered in 'Voorraad_in' (= incoming stock) and then related records are created in 'Voorraad_uit' when an incoming stock item is partly or completely shipped.  This second table contains mainly the outgoing amount and a unique outgoing delivery ID.

      As a consequence, one record in table 'Voorraad_in' (= incoming stock) can have one ore more related records in 'Voorraad_uit' (=outgoing stock).
      I want to make a subsummary report showing the total amount of incoming and outgoing units per product(name) by using the following layout structure:

      I tried two scenarios which each give me a part of the desired result.
      when I base the layout on 'Voorraad_in' (=incoming stock): I get the right totals for incoming deliveries I get all the incoming deliveries listed (also those without outgoing delivery) Body part 3 (see above) only shows one row also when there are more than one related outgoing transactions I get the wrong totals for outgoing deliveries (only based on one record) when I base the layout on 'Voorraad_uit' (=outgoing stock): I get the wrong totals for incoming deliveries I don't get all the incoming deliveries listed (only those with outgoing delivery) Body part 3 (see above) shows all the related outgoing transactions I get the right totals for outgoing deliveries Main goal is having the right totals for both incoming and outgoing deliveries..
      My layout is sorted ascending by (in mentioned order) productname, incoming delivery number and outgoing delivery number.
      The totals are calculated by using summary fields.
      I hope I'm on the right track and that the desired result is possible.. your help is much appreciated!
      Thanks in advance for your help.
    • By Steve Pfister
      Security Challenge when signing on to Paypal through Filemaker pro 18 web viewer.    I see the text "Security Challenge" but nothing else shows up... all is invisible, making it impossible to solve the security challenge and sign in....  Mac Pro..OS High Sierra 10.13  ....running Filemaker 18 .     I am having Java script issues I am assuming.   Has anyone else had this similar issue and solved it?
      Thank you in advance
    • By Pio Soto
      Hi, I was wondering if it's possible to add some design to my email, 
      I have attached a sample of what I'm looking for but the idea I got is from my quickbooks email invoice.

  • Who Viewed the Topic

  • Create New...

Important Information

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