<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV>This is a problem a got a lot and I never able to seem to solve it. </DIV>
<DIV>I want save or create a object to a specific folder or other folderish object, </DIV>
<DIV>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; I ask the user for the id of that folder or folderish object</DIV>
<DIV>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; I store the id name in a variable 'name'</DIV>
<DIV>&nbsp;</DIV>
<DIV>the problem is I know the type of the folder or folderish object but 'name' is a str object and I can't use command like name.manage_addFile().</DIV>
<DIV>The server just tells me that name is a str which contains no function manage_addFile().</DIV>
<DIV>&nbsp;</DIV>
<DIV>I always end up doing a </DIV>
<DIV>&lt;dtml-in "objectValues(['Folder'])"&gt;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; &lt;dtml-if "getId() == name"&gt;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; do something....</DIV>
<DIV>&nbsp;&nbsp;&nbsp; &lt;/dtml-if&gt;</DIV>
<DIV>&lt;/dtml-in&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>this is very ineffecient when you have a lot of data. Is there a ways I could do something like "getFolder( name ).doSomething()". Is there anything like that in dtml?</DIV></div><br>__________________________________________________<br>Do You Yahoo!?<br>Tired of spam?  Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com </body></html>