john renfrew Posted December 14, 2012 Posted December 14, 2012 After Fabrice's thinking outside the box about sort orders I decided it would be easy to make a little function that could return the record ID's for use in a ExecuteSQL( lalala IN this list ) So export a snapshot link, then use the OS path to the file in this Feel free to suggest improvements // SnapshotLinkID ( fmpsl ) // 12_12_12 JR // v1.0 // returns comma separated list of values from snapshot link file // also can get table and layout to show how it's done - amend at will fm_xml = new File( fmpsl ).getText() root = new XmlParser().parseText(fm_xml) listz = root.UIState.Rows.text().tokenize('n') a = [] listz.each{ if (it.contains('-')){ pos = it.indexOf('-') j = it[0..pos-1].toInteger() k = it[pos+1..-1].toInteger() for (i in j..k){ a.add(i) } } else { a.add(it) } } table = root.UIState.Rows.@baseTableId layout = root.UIState.Layout.@id return a.join(',') You need a field (grid) which is set to Get( RecordID) Do a script step to save as snapshot link then you can do - e.g. ExecuteSQL ( "SELECT category FROM Scripts a WHERE a.grid IN (" & SnapshotLinkID( "/Users/RWU/Documents/y.fmpsl" ) & ")" ; "" ; "" ) John R
Recommended Posts
This topic is 4431 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