
Simonpennington
Members-
Posts
20 -
Joined
-
Last visited
Simonpennington's Achievements
-
dates..
Simonpennington replied to elvis_impersonating_penguin's topic in Other Internet Technologies
You put [fmp-field: date_created, format] and it should look the same as in filemaker Simon -
Some of my customers are getting error 4's from links where the url is made up by web companion. They are not experiencing the same when they use a search form just from urls. Here is one of them. <a href="fmpro?-db=mycandidatedatabase.fp5&-format=result.htm&-LOP=or&-max=all&-sortfield=surname&-sort=ascend&-token.1=[fmp-field: username]&-token.2=[fmp-field: password]&-max=30&source=[fmp-field: source]&-find"> The only thing I can think is that their username which is placed in the url contains a space and we companion is not putting %20 in instead of the space and this is causing a problem. Although it doesn't happen from my machine just from some of my customers. Any light will be gratefully appreciated. Simon
-
Passing Tokens to FM?
Simonpennington replied to BuddySystems's topic in Other Internet Technologies
You may want to see my post to a similar question in the CDML forum under help w/cookies. I think it might answer your token question (no pun intended) Simon -
I agree with the guy above, as I said earlier cookies are unrliable and I still believe that you can get away with using tokens and fields. but if you do keep on the cookie way then I have had the following thoughts. Right rethinking my answers from before here are some problems that i can see that you will have. The person puts in their code. Add a new record to your access database and get the next page which adds the cookies and takes them on to the next page which adds the cookies to the search criteria. Fine so far. When they get the results page they probably then choose a search result and get a further page of details. If you put a link on that page to the search page then you need to make it as I said above, finding the access code in the access database. Prblem I can see is that after they have been in once then they are going to find more than one instants of their code therefore you have to add in to the link &-max=1 Because they are basically doing the same search as the redirect page you do not need two versions of the search page as the page they get to after the redirect will be good enough as you would have found the record which would then put the code in where the fm tags are for it in the search form. I think this is right now. I still suggest that you use my token version above as it is much more robust than cookies. with a token version you would put in the link url &in_number=[fmp-currenttoken:1] and that would put the code in. If you have used the [fmp-link] code in the results page throught o the more details page then the token would have gone to the next page as well If you have this online I wouldn't mind having a go to see if you have any other problems (if you want you can email me the link and a code) Simon [This message has been edited by Simonpennington (edited December 17, 2000).]
-
Have you made sure that the link you are clicking on from the other pages is exactly the same as on your redirect page. If it is the cookie should register. You have to make sure that you have an action tag on the end of the url. ie -find, but not -view as it won't parse out the tag codes. You don't need to do anything to make the cookies re appear just make sure the page is a result of an action. I am glad I could be of assistance. Simon I added later::: The above won't work as the redirect page uses the result of a field that they have entered in the page before. Of course when they use a link later on they haven't just entered the data into the field to use it in the link. You need to change the field to use the cookie. FMPro?-db=Access&-lay=form&-format=search.html&id_number=[fmp-cookie: yoursecretcode]&-find I think that should now work. Simon [This message has been edited by Simonpennington (edited December 17, 2000).] [This message has been edited by Simonpennington (edited December 17, 2000).]
-
Your problem is that the url is not finding anything. It must have an action tag at the end. I am not sure that -view would work is web companion wouldn't parse out the tags for the cookies. How about finding the access entry that has just been added. I have just had a thought you don't need to use cookies or a middle page if you use the access database. You can just pass the code around with a token. This I believe would be more robust than cookies as people can have cookies turned off in their browser but not tokens. Here goes. The first page stays the same. The person enters their id number into field id_number (or whatever you've called it. They then get the next page which is your search page and you add two lines into the search form. <type="hidden" name="id_number" value="[fmp-field: id_number]"> <type="hidden" name="-token.1" value="[fmp-field: id_number]"> They then preform the search and the id_number is passed across with the token to the next page. From then on you make sure every link has &-token.1=[fmp-currenttoken:1] in it so that it passes the id_number around. You would then have to make a duplicate of your search page as the last one is only good for the first time that they access the search. Each subsequent time you would have them access a search page which uses the token to set the id number. With a search line of <type="hidden" name="id_number" value="[fmp-currenttoken:1]"> This would stop the need for cookies. If you still want to go the way off the cookie then this is what is wrong with your redirect url it should read. FMPro?-db=Access&-lay=Layout%20#1&-format=search.html&id_number=[fmp-field: id_numberfieldfromlastpage]&-find That will solve that problem Can I make one more suggestion. You have used the name of the default layout that Filemaker gives you Layout #1. I suggest you rename this to something with no spaces in or use _ instead of a space. Certain items in the filemaker tags have difficulty using spaces in field names and layouts and its best to start from the beginning with out them. Hope this clears it up, and whichever way you go I hope it works for you. Simon
-
You have to have a page inbetween the two searches so that the cookie can be registered on the persons machine. Have them put their number in a field that say puts a new record in an access database. (a good way as well of seeing how many times they use the database). On the results page have a meta redirect through to the second search page. This would have to be a cdml fmpro? action so the web companion changes the fmp tags in the search page. Also put on that page : [FMP-SetCookie: usercode=Field: fieldnamefromlastpage, Expires=2222259200] Then on the next page that this refreshes to and that contains the searchpage put this in your form <type="hidden" name="usercode(or whatever your field is called)" value="[fmp-cookie: usercode]"> This will be replaced with the value from your cookie. Hope this helps Simon
-
The code you use is [FMP-If: (Field:country.Eq.us).or.(Field:country.Eq.usa)] Welcome citizen! [FMP-ElseIf: Field:country.Eq.texas] Howdy, Pardner! [/FMP-If] I also assume that the .or. can be replaced with .and. although i haven't tried it. This is taken straight from the CDML reference file that comes with Filemaker 5 developer. So it may be v5 only. I do wish filemaker would allow us to put the cdml reference file up on a website for download as it really answers probably 60% or higher of the questions asked on this discussion forum. It seems really daft that they would have this capability in filemaker and then not give you any references with which to use it. If it was only something that came with developer I would understand but it doesn't even come with unlimited either which is a web specific version of filemaker v5. Anyway hope this helps. Simon [This message has been edited by Simonpennington (edited December 15, 2000).]
-
Displaying fields from relational database
Simonpennington replied to ctaylor's topic in Other Internet Technologies
The cdml reference tells you to use this code for portal information [FMP-Portal: InvoiceID] [FMP-Field: fieldname::relationship name] - [FMP-Field: InvoiceID::Product Count]<br> [/FMP-Portal] Therefore I would assume you could access the information in a related field by using [FMP-Field: fieldname::relationship name] I haven't used this yet so I can't be sure. Might be worth a try though Simon -
field validation before displaying HTML
Simonpennington replied to ctaylor's topic in Other Internet Technologies
The way I do it (which is probably long winded) is to make the field that states the route to the picture have an auto entry of "none" and then put on the page [fmp-if: picturelink.eq.none][fmp-else]<img src="http://www.mydomain.com/pictures/[fmp-field: picturelink]">[/fmp-if] This shows the picture if you have added a link, and no picture if you haven't. If you are having the picture in a container field, then I don't know haven't had to think about it, as I found having pictures served this way to the web from filemaker was very slow. Hope this helps Simon -
submit 2 pages to 1 record
Simonpennington replied to andyZhang's topic in Other Internet Technologies
Vaughan had it totally correct. You don't need to do anything clever here. On the first page have the submit button use the -new action. Have the form have the tag of -format="page_of_second_questions.htm" when they submit the first page the record is created. On the second page create the form as such <FORM ACTION="FMPro" METHOD="POST"> <INPUT TYPE="hidden" NAME="-db" VALUE="database_of_answers.FP5"> <input type="hidden" name="-format" Value="nextpage.html"> <input type="hidden" name="-recid" value="[fmp-currentrecid]"> plus any other tags you need. Then make the submit button at the end use the action -edit. You can then have the third page show the person what they have answered to all the questions and click on an ok to submit them or edit them. The recid and currentrecid on the second page tell filemaker that this is an edit of the record ceated on the first page. I use this for a CV input section on my website that goes over nine pages. I also have hidden values on each page that when that page is submitted it puts a yes in a box so that the person when they come back and log in to their home page I use [fmp-if] tags to tell them which pages of the cv they have filled in and which they still have to do. Hope this makes it clear. Anymore help needed just ask. But this really is the simplest way to do it, you don't need java. Simon -
Every one is correct in saying that in FM4 you can only pass one token but in FM5 you can pass up to 9 tokens at any one time by using -token.1 upto -token.9 and calling them back by using [fmp-currenttoken:1] to [fmp-currenttoken:9] This makes fm5 a lot more powerful than fm4, come on every one upgrade now the experience is really worth it. Simon
-
Refreshing Home Page And Static Pages.
Simonpennington replied to John Pepper's topic in Other Internet Technologies
Another way I have found is to always use the -view command to access the page, this seems to make web companion always get the new page. It is advisable I think to use this as if you change your page on the internet then every one accessing the page through a browser will get the old one as well unless they do a cache dump. Using -view will always ensure that people get the new changes. Simon -
Summarised data duisplay
Simonpennington replied to gary jones's topic in Other Internet Technologies
If you are using FMP5 you can use [fmp-inlineaction] tags to search your database and give back the results ie [fmp-inlineaction: -db=widget.fp5, -lay=all, big_widget="yes", -max=all, -find]<a href="fmpro?-db=widget.fp5&-format=detail.htm&-big_widget=yes&-find">There [fmp-if: currentfoundcount.eq.1]is[fmp-elseif]are[/fmp-if] [fmp-currentfoundcount] [fmp-if: currentfoundcount.eq.1]company[fmp-elseif]companies[/fmp-if] in the database.</a>[/fmp-inlineaction] This gives you the found amount in the search plus a link through to a detail page that would give the names of the companies not just the found amount. You can include as many as you want of these on the page. For your second example you would use the inline tag again but add the [fmp-record] tag ie: [fmp-inlineaction: -db=widget.fp5, -lay=all, big_widget="yes", -max=all, -find][fmp-record]<a href="[FMP-linkrecid: layout=all, Format=detail.htm][fmp-field: company_name]</a> [/fmp-record][/fmp-inlineaction] This would give you a list of names that matched your result and the [fmp-linkrecid] would take theuser through to a format page that would give a break down of that company. Unfortunately this only works on FMP5 and it does slow down the showing of the page as fmp5 does a search for each inlineaction on the page and then renders the page. I hope this helps. As I have said before this inline tag is very powerful and gives much better pages. I have a cv search site working where companies can set preferences and then when they access their individual page it automatically gives them the results of their preference searches and a link through to the cvs that match it. The inline tag basically says at this point in the page preform this search and show this information found within the cdml tags and when you get to the close tags start using the information that you had from the search that generated the page itself. If say my customer has set up a preference search and they log in. The cdml replacement tags in side my inlineaction tag are replaced with the user preferences. This only works by putting them in {} brackets not [] ie your customer says always show me on my page the big widget companies, you could have them fill out a preferences page that adds big widget companies in london to a field as a preference then on your page put the following code. [fmp-if: big_widget.eq.yes][fmp-inlineaction: -db=widget.fp5, -lay=all, big_widget="yes", area="{fmp-field: area}", -max=all, -find][fmp-record]<a href="[FMP-linkrecid: layout=all, Format=detail.htm][fmp-field: company_name]</a> [/fmp-record][/fmp-inlineaction][/fmp-if] This would search for big widget companies in London if that is what the customer has said they want and not show it if they don't. I hope this helps, If you can't understand anything please post. I have a tendency to lose my self when I explain things. Simon [This message has been edited by Simonpennington (edited November 15, 2000).]