September 19, 200322 yr Hi I have a portal and some fields with popup menus inside it. One of the popups shows the result of an inlineaction find request. The problem is that this inline request is running for each portal row and is slowing down the machine . I guess I need some help with Java here... How can I store an Inline results in a variable and then use this variable in the popup menu? The inline code is : [FMP-InlineAction:-db=reservations.fp5,-lay=Webmain,User1_user2={fmp-currenttoken},-max=all,-find] [FMP-Record] <option value="[fmp-field:id]"> [Fmp-field:id] - [fmp-field:project]</option> [/FMP-Record] [/FMP-InlineAction] Tnx
September 19, 200322 yr I wouldn't use Java (couldn't), however Javascript will do the job. You can use Arrays to store the list. Some examples exist in these Forums. I will have a look later today. All the best. Garry
September 19, 200322 yr Author Hi I tried to look for some examples on the forum, but couldnt find anything similar... I don;t know JS very good...but still how can I insert INLINE results into JS array?
September 20, 200322 yr Try this: <script> var aDept = new Array(); i = 0; [FMP-InlineAction: -db=employees.fp5, -lay=web, -sortfield=department, -max=all, -findall] [FMP-Record] aDept[i++]="[FMP-Field: department]"; [/FMP-Record] [/FMP-InlineAction] </script> </head> <body> <form .... .... <select name="department"> <option value="">Select a Department</option> <script> for (a=0; a < aDept.length; a++) { document.write("<option value='" + aDept[a] + "'>" + aDept[a] + "</option>"); }; </script> </select> .... Good Luck Garry
Create an account or sign in to comment