Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Filtering Data from one field from multiple portal records using the LIST function


AdrianV
 Share

Recommended Posts

I followed the instructions in the following link placing it on a button in a portal.

 

http://help.filemaker.com/app/answers/detail/a_id/2403/~/how-to-copy-data-to-one-field-from-multiple-portal-records

 

On the records I have a field with a value of "ACTIVE" or "INACTIVE"

 

ACTIVE RECORDS are in one filtered portal where this LIST function button resides and INACTIVE RECORDS go to another filtered portal.

 

When I initiate the script I am getting the correct field data into the COMBINE field... however it is also listing INACTIVE records in the other portal. Is there a way I can filter the result down to only displaying ACTIVE records when the text gets pasted into the COMBINE field?

Link to comment
Share on other sites

List() works on the relationship level, while a portal filter works on the layout level.

 

Since you are already employing a script, you could have it loop through the portal rows and compile the required values; e.g.

 

Go to Object [ "objectNameOfActivePortal" ]

Go to Portal Row [ first ]

Loop

..Set Variable [ $compiler ; List ( $compiler ; PortalTO::yourField ) ]

..Go to Portal Row [ next ; exit after last ]

End Loop

# [do something with $compiler, e.g. Set Field[] ]

 

Another idea would be to use ExecuteSQL() along the lines of

 

ExecuteSQL (

"

SELECT whatEverField

FROM thePortalTable

WHERE activeField = ?

" ; "" ; "" ; "ACTIVE"

)

 

As an aside: I recommend simply using an “active?” field of type number into which you write a 1 or a 0.

 

These values can be much easier parsed in calculations and scripts because they represent True and False, respectively. You can then e.g. put this on the layout as a checkbox with a value list of just 1, and use a label to clarify what the field means.

 

PS: That Help document is rather ancient and hasn't been updated to employ modern features, e.g. $variables; contrary to what it suggests, don't use Copy & Paste if you can possibly avoid it. C&P requires the presence of the involved fields on the layout, overwrites possibly more important data in your (or a user's) clipboard, and (not that critical) it is slower than alternate methods.

Edited by eos
Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

Terms of Use