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

How to Display Find Criteria in Header?


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

Recommended Posts

Posted

I designed a generic layout in which users can perform a find with various criteria. I would like to display that criteria to them in the header so when they print out the results it includes how they found them.

Any Ideas on how to do this?

Posted (edited)

I called this script using the onModeExit script trigger. Hopefully this helps. I have also attached a sample file. Feel free to dissect. I haven't written it to allow for multiple requests. This should be an easy enough change to make though by wrapping the single loop in another that flips through the requests. Also, if there are no results and the user hits cancel, the find criteria still appears in the box. Again, this could be eliminated.


Set Variable [ $fieldList; Value:FieldNames ( Get ( FileName ) ; Get ( LayoutName ) ) ] 

Set Variable [ $fieldCounter; Value:ValueCount ( $fieldList ) ] 

Loop 

Exit Loop If [ $fieldCounter = 0 ] 

Set Variable [ $field; Value:GetValue ( $fieldList; $fieldCounter ) ] 

Set Variable [ $findCriteria; Value:$findCriteria & 

Case ( 

   not IsEmpty ( Evaluate ( $field ) ) and not IsEmpty ( $findCriteria ); 

   " | " 

) & 

Case ( 

   not IsEmpty ( Evaluate ( $field  ) ); 

   TextStyleAdd ( 

      FieldComment ( Get ( FileName ); $field ); 

      Bold 

   ) & " " & 

   Evaluate ( $field ) 

) ] 

Set Variable [ $fieldCounter; Value:$fieldCounter - 1 ] 

End Loop 

Set Field [ Company::z_findCriteria_gt; $findCriteria ] 

FMers, If you have a better way / some input on this, I'd love to hear it!

Also, not exactly sure how to track for Constrain / Extend Found Set and I don't think this will work on GTRRs / scripted finds. Just FYI.

Display_Find_Criteria.fp7.zip

Edited by Guest
  • 4 weeks later...

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