proton Posted October 20, 2000 Posted October 20, 2000 I'm doing an online database. Upon logging in to the database the user's record is updated by placing the user's ClientIP and the Current Date in a field. This is done similar to the following: <a href="...snip...FMPro?-DB=database1.fp3&-RecID=[FMP-CurrentRecID]&field1=[FMP-ClientIP]+[FMP-CurrentDate]&-Edit"> Now I'm just typing randomly here (leaving out format and so on), so pardon any errors. This link works. It places the client ip and the current date in the field. But in another page I have a link that attempts to assign this value (Client IP and Current Date) to another field. It goes something like this: <a href="...snip...FMPro?-DB=database1.fp3&-RecID=[FMP-CurrentRecID]&field2=[FMP-Field: field1]&-Edit"> (again leaving out the format and so on) But when I click on this link it doesn't work. I get an Unknown command error. Upon investigation I discovered that using the "+" sign in the first link allows me to put different values in field1, but it puts spaces between them (i.e. a space between the client ip and the date) and I think when I attempt to pass this in the next link that it can't handle the spaces, so I get an error. The reason I think this is if I just put a regular value in the second link (e.g. field2=dog), the link works fine. Now I can just circumvent this by creating two fields in the database - one for the ip and another for the current date - and then create a third field (ie a calculated field) that puts them together without the space and pass the calculated field to field2. What I'm wondering is, instead of doing that, is there a say to put both the client ip and current date in field1 using the link? Thanks
Vaughan Posted October 23, 2000 Posted October 23, 2000 The [FMP-Field] cdml tag has an "encoding" option that fixes this up quick smart. Just change it to [FMP-Field: fieldname, url] and the spaces will be replaced with %20 etc. rereading your post I also have the feeling that you may need to revisit the logic behind the "+" to concactinate the values. This should work but only if the field has h=that value in it. In fact, if you leave the "+" out all together the two values will be joined up.
proton Posted October 23, 2000 Author Posted October 23, 2000 quote: Originally posted by Vaughan: The [FMP-Field] cdml tag has an "encoding" option that fixes this up quick smart. Just change it to [FMP-Field: fieldname, url] and the spaces will be replaced with %20 etc. rereading your post I also have the feeling that you may need to revisit the logic behind the "+" to concactinate the values. This should work but only if the field has h=that value in it. In fact, if you leave the "+" out all together the two values will be joined up. Thanks vaughn..That helps a lot a lot. You don't have to put the plus? I didn't know that. So I can just put the values with spaces between them like [FMP-ClientIP] [FMP-CurrentDate]? I'm assigning the values in a link so I didn't think that I could put the spaces..Or maybe you are saying that I just put them together like [FMP-ClientIP][FMP-CurrentDate]ect. I'll look at it. Thanks again.
Vaughan Posted October 25, 2000 Posted October 25, 2000 No need for 'joining" symbols on the html page. it's just one long continuous string of text that the browser interprets. You can just put the [FMP-Field] tags together, like you say... groovy isn't it, it opens up a whole heap of possibilities!
proton Posted October 26, 2000 Author Posted October 26, 2000 quote: Originally posted by Vaughan: No need for 'joining" symbols on the html page. it's just one long continuous string of text that the browser interprets. You can just put the [FMP-Field] tags together, like you say... groovy isn't it, it opens up a whole heap of possibilities! That's really cool! Thanks Vaughan!! I'll try it out.
Recommended Posts
This topic is 8863 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