Gossamer Forum
Home : Products : DBMan : Customization :

Adding URL into email from userid and itemid

Quote Reply
Adding URL into email from userid and itemid
In my email after record added mod, I want to have a listing in the email that says something like:

You can view your newly added listing here:

http://url to listing

But since this email is going to be automatically sent, I need it to somehow pick up the url from the userid and the id number that the email is going to be sent from.
For example, userid of user123 and record id of 12, so the email needs to pick up those 2 fields and come up with the url for that particular combination to link to the record. Since this needs to be done automatically, I cannot just add a static link in the email variables as I found on the FAQ's. Unless somehow, it could be listed with the *'s like
http://www.domain.com/cgi-local/db.cgi?db=default&uid=*&id=*?
Maybe this needs to be in a defined field where I could just add $rec{'url'} ? But even then, i'm not sure how to come up with the "sum" of the 2 fields for the url field. I'm not too sure what to do, can someone help? Thanks!

Smile
Quote Reply
Re: [wdu2002] Adding URL into email from userid and itemid In reply to
You'd use something like:

http://www.domain.com/cgi-local/db.cgi?db=default&uid=$in{'UserID'}&id=$in{'ID'}

Substitue the variable names to match yours... There is probably a working example in the FAQ that you could cut & paste.

http://webmagic.hypermart.net/dbman/

The only caveat will be if you require you users to "log in" first.