xtrim Posted May 8, 2003 Posted May 8, 2003 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?
Garry Claridge Posted May 9, 2003 Posted May 9, 2003 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
xtrim Posted May 9, 2003 Author Posted May 9, 2003 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?
Garry Claridge Posted May 9, 2003 Posted May 9, 2003 Did you create a Calculated field which concatenates the two fields? Then create a ValueList based on that Calculated field? Good Luck. Garry
xtrim Posted May 9, 2003 Author Posted May 9, 2003 Hi I'm sorry, but I don't understand which two fields do I have concatenate?
Garry Claridge Posted May 10, 2003 Posted May 10, 2003 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
xtrim Posted May 13, 2003 Author Posted May 13, 2003 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
Pupiweb Posted May 15, 2003 Posted May 15, 2003 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
xtrim Posted May 18, 2003 Author Posted May 18, 2003 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
Pupiweb Posted May 18, 2003 Posted May 18, 2003 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
xtrim Posted May 18, 2003 Author Posted May 18, 2003 It's working ! Tnx very very very much for your help. This is the best forum....and YOU are the man
Recommended Posts
This topic is 7929 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