Jump to content

clevow

Members
  • Posts

    74
  • Joined

  • Last visited

Everything posted by clevow

  1. the format file is the file that the results are displayed in. i.e. -format=blah.html i don't want to have to use scripts via the web. thanks!
  2. any ideas on how I search within the current found set? i just can't figure it out since the format file for the search and search results would be different. any ideas would be appreciated. thanks, carrie
  3. nevermind. i'm not sure if i was hallucinating or what, but it does work.
  4. Okay, a year later.... When I use this code it displays properly. However, it doesn't work because the html it ends up generating includes all of the scripting stuff. For example, the code (from "view source") is: <table><tr><script> i = 1 ; nCols = 3; if ((i % nCols) == 0) { document.write("<td><input type="checkbox" name="Genre" value="adventure">adventure</td></tr><tr>");} else { document.write("<td><input type="checkbox" name="Genre" value="adventure">adventure</td>");}; i++; if ((i % nCols) == 0) { document.write("<td><input type="checkbox" name="Genre" value="animals">animals</td></tr><tr>");} else { document.write("<td><input type="checkbox" name="Genre" value="animals">animals</td>");}; i++; etc. the code in the unprocessed HTML is: <script> i = 1 ; nCols = 3; [FMP-ValueList: Genre, List=Genre List] if ((i % nCols) == 0) { document.write("<td><input type="checkbox" name="Genre" value="[FMP-ValueListItem]">[FMP-ValueListItem]</td></tr><tr>");} else { document.write("<td><input type="checkbox" name="Genre" value="[FMP-ValueListItem]">[FMP-ValueListItem]</td>");}; i++;[/FMP-ValueList] </script> Help? Thanks, Carrie
  5. I've got a search page that displays all the values in a value list as checkboxes. Does anyone know how I could possibly format the value list so it is more than one column? custom web publishing, FMP 5.5 on Windows. Javascript is really my only scripting option. For example: current formatting: [_] Item 1 [_] Item 2 [_] Item 3 [_] Item 4 [_] Item 5 [_] Item 6 desired formatting: [_] Item 1 [_] Item 4 [_] Item 2 [_] Item 5 [_] Item 3 [_] Item 6 acceptable formatting, but not preferred: [_] Item 1 [_] Item 2 [_] Item 3 [_] Item 4 [_] Item 5 [_] Item 6 Thanks for your help and ideas, Carrie
  6. I've just tried this and it works for me: [fmp-if:currenttoken:1.neq.field:id] if that doesn't work, perhaps you could post your code so that we can better help. -Carrie
  7. I have an administrative database from which I can open and close other databases by way of scripts. The way I currently have it set up is each database that is going to be accessible via admin.fp5 has a record in admin.fp5. I want to be able to have a single script that will open a file based on the contents of the field. For example: admin.fp5 contains the field DATABASE which is the name of the database to be administered so let's say records one and two in the db have the entries in the field DATABASE orders.fp5 and customers.fp5. I want to be able to have one script called OPEN and one called CLOSE. Running the script will open or close the database listed in the DATABASE field of the current record. The problem is that you can't pass the field contents to the name of the script you want to run. Ultimately, I will use this in a loop to go record by record and check to see if the database is open, and if it is, save a copy of it. (The database name field would come in to play here too.) If anyone knows of a way to do this within FileMaker, please let me know. Or, if you know of a plugin that will suit my purposes, I'm happy to go that route too. TIA, Carrie
  8. [fmp-if:currenttoken:1.neq.field:Id] i think....
  9. I was actually referring to the script posted by Eddy. The page this is being used on is a catalog of things that can be ordered. Every item has a submit button next to it that creates a new record (-new). The whole thing is kind of a shopping cart scenario. I just need to make sure that when someone "Adds to Cart" they have chosen a color, size, and quantity of said item. Thanks for the help, Carrie
  10. this doesn't seem to work when there are multiple forms on a page. any ideas? i've got a form that gets generated on a per record basis (that is, the form tags are inside the [fmp-record][/fmp-record] tags. I have another javascript i've used with FMP in the past and it won't work on this page either.
  11. Okay, I'm going a little crazy. I've read through a bunch of the posts on displaying a value list that is based on related values and I'm still not able to do what I need. I've got a database that is essentially a clothing inventory/availability. I have a value list called "sizes" which contains all the available sizes for all items in the database. In the db this is displayed as check boxes. If an item is available in a particular size, the checkbox is checked. I have another value list called "colors" which works in the same way, except that I have the value list based on fields from another table. Now for the web side... using custom web publishing, FMP5 unlimited on Windows XP- Ultimately, I want the user to get a list of available items and then choose which they want and in what sizes and colors. The first hurdle that I need help on is this. How the heck can I get the appropriate sizes (and colors) to show up in a value list? I don't care if it's a drop down menu or radio buttons. I just want the user to only see, and be allowed to choose, sizes and colors that are available. In the various iterations I've tried, the closest I've come is using a portal. My problem here is that all the available sizes end up displaying on one line, as one option. I can't get them to be separate values. I've also tried a calculation field using the design function "valuelistitems" but had no further success. This database is not very big, so any suggestions, including redoing the relationships and such are welcome. TIA, Carrie
  12. I'm running it on a Windows 2k workstation, using IIS, unfortunately. I've got everything worked out, except for the importing of the addresses. I can use FTP or whatever, but I need to have a way for the user to upload the file from a web interface. Everything I've seen so far has been perl scripted. I'm trying to get perl for windows working, but I haven't had luck with that in the past. I'm using SMTPit to send the email. I actually used the database last week to send 6500 emails and it worked great. Now I'm just trying to webify it. Thanks for the help, Carrie
  13. didn't mean to bite your head off. sorry. it was first thing in the morning. the db will be web enabled. the user will be able to specify the global fields - body, from name, from address, etc. the list of addresses it gets sent to needs to be imported somehow to populate the other fields. that's what i'm trying to figure out how to do. thanks, carrie
  14. Well, "Unable," thanks for your helpful comments. FYI, I know HTML, I use custom web publishing, and I started with FMP and Lasso back in 1997. That was in a former job. Now all I have is FMP 5.5. And I always search the forums before I post. Thank you. For those with helpful ideas, I appreciate it. I am, however, trying to avoid using any perl scripting, since that will require my hosting on another server. I also want to keep this strictly web-based, so I'd rather not have to do an import manually. As I said, I'm fine with using FMP scripting, but I couldn't see how I could do that, since you either have to specify a file name or have the user choose it. Thanks for any other ideas. -Carrie
  15. Does anyone have an idea as to how to import records from a web interface? Scripts are fine. (yes, I know using scripts from the web is not the best, but it's fine for this application.) Background: This database is going to be used to send email. It basically does a mail merge kind of thing. I've designed it so that every email to be sent is its own record. The subject, body, etc. are all global fields. The only individually definable fields are the first name, last name, email address, and "other." I want a user to be able to upload a list (text file or XLS) containing these four fields. Each line of the text file would have to create a new record in the database. I can require the text file to have all four fields present for every record, so that part isn't an issue. That is, I can predefine the field mappings and all. It is possible that the email list may contain 7000 addresses, so I don't want it to take that long to upload. I also don't think I can have the addresses entered into one text field since it'll potentially exceed the maximum number of characters allowed. Thoughts and ideas are much appreciated. Thanks! -Carrie
  16. So was there any agreement on a way to edit multiple records from one page? I'd like to do this as well. Any way it could be done would work for me. Thanks, Carrie
  17. hmm. don't think that'll work on the web, but it's good to know.
  18. quote: Create a script & attach it to the calc field that recalculates... What do you mean by "attach it to the calc field"?
  19. Does anyone know of a way (or a work around) to calculate a field only one time? I really really don't want to use a script or a plugin. What I want is for a calculation to get performed when a different field changes. But I only want the calculation to get performed once. What I'm trying to do is have email get generated once a record has been modified one time. The record will get created via the web and then modified via the web. Once that modification has occurred the record won't be touched again. I'm using the SMTPit plug-in to send the mail. Any ideas? FTR, FMP 5.5 running on Win2k pro, with IIS running as a webserver. Thanks, Carrie
  20. I'm using the demo version of SMTPit to send mail. When I try to pull the email address from a field (ironically, called "email_address), it doesn't actually pull it. It'll say that it's "cleared." If I use a static address it works fine. Any ideas on why that would happen? The calculation is: External("SMTP-ClearAll", "") & "
  21. Aha! I've found a way! It's kind of nasty, but it'll do. Since I'm sure other people have wanted to do this, I'll explain what I did. First, a little background info. The search that I'm trying to duplicate is one that will return a list of files, some of which have been reviewed. The files live in one database ("2001cd_files") and the reviews live in another ("2001cd_edits"). From this search results page, you can view the details on the file (which comes from the files database) or you can add a review. If you're going to view the file, I figure the natural tendency will be to hit back on the browser to go back to the search results, so I'm not concerned about that. It's people that enter new reviews that are the problem. So I made the link that you click on to do a new review as follows (relevant parts in bold) <a href="localhost:591/cd/FMPro?-db=2001cd_edits.fp5&-lay=edit&-format=new_review.html&fileid=[fmp-field:recid]&-token.2=[fmp-field:recid]&unity_id=[fmp-currenttoken]&search=[fmp-c urrentfind] [fmp-findopitem:short] {[fmp-findfielditem]}[fmp-findvalueitem][/fmp-currentfind]&sort=[fmp-currentsort]{[fmp-sortfielditem]}{|[fmp-sortorderitem]|}[/fmp-currentsort]&max=[fmp-currentmax]&lop=[fmp-curren tlop]&skip=[fmp-currentskip]&-new"> "search", "sort," "max", "lop" and "skip" are new fields I created in the 2001cd_edits database. The "max," "lop" and "skip" fields get populated with the current selections that returned this search results page. The "search" field will be populated with all of the fields, operators, and values used for these search results. The "sort" field will be populated with the SortFieldItem (s) and SortOrderItem (s). The { } and {| |} are used for separators. They don't get interpreted in the URL. A real search would look something like this (irrelevant parts removed): search= gt {size}5000&sort={file_name}{|ascend|}{next_step}{|descend|}{directory}{|ascend|}&max=50&lop=and&skip=52 Okay, on to the database side. I created the fields referenced above, as well as the following calculation fields: fixed_search1, fixed_search2, fixed_sort, and fixed_skip. Let's start with the easiest first. fixed_skip: Int( skip/max ) * max I wanted this because the skip number wasn't working as I wanted it to. If you had -max = 25 and you were adding a review on the 2nd record, then your skip would = 2. When you go to the URL using 2 as a skip, it'll display records 2-26 instead of 1-25. This calculation fixes that problem. fixed_search1: This was used to eliminate partial words. Meaning, if your operator is gt, gt is a part of gte. No good. So this replaced gte, lte, and neq with GTEQ, LTEQ and NOEQ. This used the following nasty nested substitute combination: Substitute(Substitute(Substitute(search, " gte ", " GREQ "), " lte ", " LTEQ "), " neq ", " NOEQ ") The leading and trailing spaces were used just in case someone searched on gte. This ensures they're whole words. fixed_sort: This took the "sort" field and used substitutions to turn it into the sort part of a URL. Unfortunately, this required putting in a substitution for every field. There may be a better way to do this. Here's the calculation: Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Subs titute(sort, "{action}", "-sortfield=action&"), "{last_reviewer}", "-sortfield=last_reviewer&"), "{next_step}", "-sortfield=next_step&"),"{status}","-sortfield=status&"), "{notes}", "-sortfield=notes&"), "{file_name}", "-sortfield=file_name&"), "{directory}", "-sortfield=directory&"), "{full_path}", "-sortfield=full_path&"), "{UID}", "-sortfield=UID&"), "{size}", "-sortfield=size&"), "{last_update_date}", "-sortfield=last_update_date&"),"{last_update_time}","-sortfield=last_update_time&"), "{access}", "-sortfield=access&"), "{extension}", "-sortfield=extension&"), "{web_path}", "-sortfield=web_path&"),"{|ascend|}","-sortorder=ascend&"),"{|descend|}","-sortorder=descend&") fixed_search2: This is similar to the "fixed_sort" field, except it makes different substitutions. It also concatenates all the necessary pieces together to form a real URL. "http://localhost:591/cd/FMPro?-db=2001cd_files.fp5&-format=search_results.html&-lay=file"& Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Subs titute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(fixed_search1, "{action}", "action="), "{last_reviewer}", "last_reviewer="), "{next_step}", "next_step="),"{status}","status="), "{notes}", "notes="), "{file_name}", "file_name="), "{directory}", "directory="), "{full_path}", "full_path="), "{UID}", "UID="), "{size}", "size="), "{last_update_date}", "last_update_date="),"{last_update_time}","last_update_time="), "{access}", "access="), "{extension}", "extension="), "{web_path}", "web_path=")," eq ", "&-op=eq&"), " cn ", "&-op=cn&"), " bw ", "&-op=bw&"), " ew ", "&-op=ew&"), " gt ", "&-op=gt&"), " GREQ ", "&-op=gte&"), " lt ", "&-op=lt&"), " LTEQ ", "&-op=lte&"), " NOEQ ", "&-op=neq&")&"&-max="&max&"&-lop="&lop&"&-token="&unity_id&"&-skip="&fixed_skip&"&"&fixed_sort&"-find" So, fixed_search2 is now the correct URL to repeat the find. From there, I stored it as a token. Then I used "redirect2.html" as the -format file for submitting a new review. Redirect2 has a meta-refresh tag with a 0 wait time and URL equal to the token. <meta http-equiv="refresh" content="0;URL=[fmp-currenttoken:9]"> It took most of the day to put together, but it works exactly as I want it to. Thanks to those who tried to help. If anyone would like more clarification on this, post and I'll reply. -Carrie _______________ Note: I found that Netscape didn't like the spaces in the URL. I replaced all the spaces with * and that worked fine. [ March 08, 2002, 08:54 AM: Message edited by: Carrie ]
  22. hmmm.... only problem with that is that filemaker will only pass part of the token in the URL. if the token is FMPro?-db=2001cd_files.fp5&-lay=file&-op=eq&size=2048&-op=cn&access=r&-lop=or&-skip=4 it'll only pass it up until the first &. After that, it no longer sees it as part of the token - it's just part of the URL. Any way around that?
  23. unfortunately, there could be up to 15 items searched on. so i can't use each value separately.
  24. duh. okay i can use the fmp-link tag. didn't even think about that. thanks for the reminder Jeff.
  25. Is there any way to retain the search results so that a user can go back to them easily? For example, if a user searches for all records created today, then goes and modifies one, then wants to go back to the list of results. The only way I can see to do that is to actually execute the search again, in which case the user needs to remember what he actually searched for. The initial search will be done via a form, not a URL. Thanks, Carrie
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.