SarahF Posted March 6, 2006 Posted March 6, 2006 Hello, It seems like there should be a Simple solution to this but it's currently eluding me.... I have a multi-step process to fill out a record. The user inputs their info and clicks submit, which takes to a page to enter more info for the same record. However, the database naturally creates a new record for this second page instead of truncating it to the first. How do I tell it to use the first record, and how do I tell it which record to use?? I'm just using html. Thanks! Sarah
Garry Claridge Posted March 7, 2006 Posted March 7, 2006 For pages after the first, you will need to grab the RecordID and use the "-edit" command. Are you using CDML with your HTML? All the best. Garry
SarahF Posted March 7, 2006 Author Posted March 7, 2006 Hi Garry, How do i grab the recordID? and then I change the -new to -edit in the submit. not sure what CDML is. Thanks! Sarah
Garry Claridge Posted March 8, 2006 Posted March 8, 2006 If you are using Custom Web Publishing; i.e. tags like: ..... ...... then you are using CDML. If so, you can get the RecordID after the first page with: [FMP-CurrentRecID] You could then use it in the Form on the following pages as such: ...... Good Luck. Garry
SarahF Posted March 8, 2006 Author Posted March 8, 2006 Hi Garry, Awesome, thanks I got that part to work. I am indeed using CDML. One more question (for now ) After they fill in the first form and click submit, it takes them to the next page where they can click a link if they want to skip this page and go to the end. How can I continue to pass along their record id? Can I do it through a URL variable? Thanks much! Sarah
SarahF Posted March 8, 2006 Author Posted March 8, 2006 (edited) I actually got that part too - I added another submit button at the top that could include the Recid info. Easy enough. When I enter my first record, it all completes ok. But after that, when I try to enter another one, it says there was an error adding a new record to the database and it didn't enter it. It gives a variety of error codes, 504 and 101, I think. I couldn't find a list of those codes in the help section. I have to completely shut down Filemaker and restart it before it will work again. Any ideas? Thanks! Sarah Edited March 8, 2006 by Guest
Garry Claridge Posted March 8, 2006 Posted March 8, 2006 You can use Tokens to pass the RecID along. For example, the link to "skip" a page may have a "-view" action with which the "-token" parameter can be used. a href="FMPro?-db=mydb.fp5&-token=[FMP-CurrentRecID]&-format=thenextpage.html&-view">Skip This Page The 504 error is saying that a unique value already exists in the database. The 101 error is saying that a record is missing. All the best. Garry
SarahF Posted March 9, 2006 Author Posted March 9, 2006 (edited) Hi Garry, I figured out that I get that 504 error when I enter a password that's already been used. How can I modify that to make it more user-friendly? If I didn't know, users sure aren't going to! I've got it where it skips the page now and knows what database it's in on the last page. However, it doesn't fill in the UserID and password fields. Do I need to pass that info along too? If so, would it go in another token or what would I call it? I tried calling it within the page as [FMP-CurrentRecID] and [FMP-Field:UserID] but neither of those worked. This one works [FMP-CURRENTDATABASE: HTML] but I'm not sure why. Lastly, where did you learn all this stuff and can you recommend any resources for me? Your knowledge is invaluable and I really appreciate your help. Sarah Edited March 9, 2006 by Guest
Garry Claridge Posted March 10, 2006 Posted March 10, 2006 You can use the "-error" parameter to open an error page, then you can test for the error with the [FMP-CurrentError] tag. You could do a "-find" on each page (other than the first) using the "-recid". This will return the UserID and Password. Or, you could pass them with tokens; e.g. ..... They can be retrieved with: [FMP-CurrentToken: 0] [FMP-CurrentToken: 1] .... [FMP-CurrentToken: 9] Good Luck. Garry p.s. The CDML Reference Database is a valuable resource.
Recommended Posts
This topic is 6825 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