May 8, 200322 yr Hi I've been reading here that there is a problem in CDML with valuelist with related values. I've tried all the examples/suggestions and still didn't get it... Structure & func': Web_users.fp5 is the file that I use for web interface with the rest of the DBs. "username" is the field that I use in the relationship with units.fp5. Relationship name is : "Units List for active systems" After a user enters his username,It displays all the units of that user in a portal. "Sys_id_main" is a field that belongs to units.fp5. I need to be able to have a drop down menu for that field with all the "sys_id_main"s that belongs to that user, so the user can shift his units between his systems only. I managed to do it with a value list in FMP and IWP, but I need it in CDML - and I pretty much stuck. SO basically I need a valuelist with related values for a related field in a portal.... any suggestions?
May 9, 200322 yr Check this thread for a suggested "work-around": http://www.fmforums.com/threads/showflat.php?Cat=&Board=UBB22&Number=51804&Forum=UBB22&Words=valuelist&Match=Entire%20Phrase&Searchpage=2&Limit=25&Old=1year&Main=51754&Search=true#Post51804 It uses a Calculated field and a little bit of Javascript. All the best. Garry
May 9, 200322 yr Author Hi I changed the code to the values that I need but still didn't get any results The code is : <select name="Units List for active systems::sys_id_main"> <script> [FMP-ValueList: Units List for active systems::sys_id_main, List=active_systems] val = "[FMP-ValueListItem]".split(":") ; document.write("<option value="+ val[0] + " [FMP-ValueListChecked]>" + val[1] + "</option>") ; [/FMP-ValueList] </script> </select> What did I do wrong?
May 9, 200322 yr Did you create a Calculated field which concatenates the two fields? Then create a ValueList based on that Calculated field? Good Luck. Garry
May 10, 200322 yr I've reread your original question. I believe you need to use [FMP-Portal] or [FMP-InlineAction] tags to achieve what you desire. Check those two tags in the "CDML Reference" database. All the best. Garry
May 13, 200322 yr Author Hi The "CDML reference" does no elaborate too much... I tried to use various examples that I've found in this forum, but still no results - It displays NOTHING. Local DB : Web_users.fp5 Field : Units List for active systems::sys_id_main Valuelist: active_systems (uses a different realationship : Active_systems). Realationl DB : Reservations.fp5 [FMP-PORTAL: Units List for active systems] <FONT SIZE="-1"><TABLE BORDER=1 CELLSPACING=0 CELLPADDING=0> <TR> <TD> <P><FONT SIZE="-1"><TABLE BORDER=0 WIDTH=71> <TR> <TD> <CENTER<select name="Units List for active systems::sys_id_main.[fmp-currentportalrownumber]" VALUE="[FMP-Field:Units List for active systems::sys_id_main]"> [FMP-InlineAction: -db=web_users.fp5, -lay=WebMain -view] [FMP-Option: active_systems] [/FMP-InlineAction] </select></CENTER> </TD> </TR> </TABLE> </FONT></P> </TD> </TR> </TABLE> </FONT> [/FMP-PORTAL]</P> I'm not sure the syntax is correct (my first inline) Maybe some could elaborate a bit about this command and it's syntax. Tnx alot
May 15, 200322 yr Try with <Select name="FieldName"> <option value=""> Select a value [FMP-InlineAction:-db==web_users.fp5,-lay=WebMain,User={field:user},-max=all,-find] [FMP-Record] <option value="[FMP-Field:System Name]"> [FMP-Field:System Name]</option> [/FMP-Record] [/FMP-InlineAction] This will produce a list of all systems related to a user Add a sort tag to the Inline if you want to sort the list items
May 18, 200322 yr Author TNX !! It's almost working : <Select name="Units List for active systems::sys_id_main.[fmp-currentportalrownumber]"> <option value=""> Select a value [FMP-InlineAction:-db=reservations.fp5,-lay=Web,User1_user2=ntal,-max=all,-find] [FMP-Record] <option value="[fmp-field:id]"> [fmp-field:id]</option> [/FMP-Record] [/FMP-InlineAction] </select> I got 2 problem : 1. I want the field to display the current value of "Units List for active systems::sys_id_main" and not "select a value" - I tried to play with it for a while and I got only the first value of the value list presented in ALL rows. 2. When I cange user1_user2=ntal to user1_user2=[fmp-field:username], it does not work. fmp-field:username is a field in the local DB and it alway with a valid username value (validation) If these two are fixed...I'm all set
May 18, 200322 yr Point 1 isn't very clear to me but it *should* be enough to put it after the <option ""> tag Point2: the problem is a syntax error Instead of user1_user2=[fmp-field:username] use {field:username} HTH
May 18, 200322 yr Author It's working ! Tnx very very very much for your help. This is the best forum....and YOU are the man
Create an account or sign in to comment