November 9, 200025 yr Newbies I guess this is a silly question but I didn't find it in this FAQ. I'm performing a -Find action to the database and in the response web page I'm using the tags : [FMP-Record] to display the set of records found, now, how can I display only one time records which have the same value for some specific field. That's simple using SQL, its' something like : SELECT name DISTINCT FROM table_name. I'd really appreciate your help. ML
November 10, 200025 yr There is no comparable command in FMP to do that. You'd have to write a script, then call the script through Web Companion with the -Script tag. I guess that if I sat here and thought about the problem I could probably come up with a method that used a self-join relationship...
November 10, 200025 yr Author Newbies I solved the problem using a simple javascript function, thanks a lot anyway, here is the code to avoid displaying multiple records with the same value on a specific field: <script language='JavaScript'> thisField="[FMP-Field:fieldName]"; document.write(thisField); </script> <br> [FMP-Record] <script language='JavaScript'> if (thisField != "[FMP-Field:fieldName]") { thisField="[FMP-Field:fieldName]" document.write(thisField); } </script> [/FMP-Record] Hope it may be useful to someone.
Create an account or sign in to comment