netbooee Posted November 5, 2009 Posted November 5, 2009 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?
LaurenKuhlman Posted November 5, 2009 Posted November 5, 2009 (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 November 5, 2009 by Guest
Recommended Posts
This topic is 5807 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 accountSign in
Already have an account? Sign in here.
Sign In Now