PJ Wassermann Posted June 23, 2005 Posted June 23, 2005 Working on a CD shop with FMP 6 and CDML I want to send the visitor from the welcome page to a list of the 10 newest CDs and open a new order record at the same time. This is not so difficult: I make the new order record while sending the visitor to the page where the CDs are listed using an inline action. My problem is to get the token of the new order record. I need to pass it along when the visitor clicks on a CD. But when he clicks on the CD it's the RecID of the CD and not the RecID of the order record. Probably I should get the token while creating the page. But how can this be done? Thanks for any hint PJ Wassermann
Garry Claridge Posted June 25, 2005 Posted June 25, 2005 If you create a new record with "-new" you can get the RecID in the next page with the [FMP-CurrentRecID]. You can assign this to a "Token" with: <input type="hidden" name="Token" value="[FMP-CurrentRecID]"> You can then reuse it with "-edit" like this: <input type="hidden" name="-recid" value="[FMP-CurrentToken]"> Good Luck. Garry
PJ Wassermann Posted June 25, 2005 Author Posted June 25, 2005 If you create a new record with "-new" you can get the RecID in the next page with the [FMP-CurrentRecID]. You can assign this to a "Token" with: <input type="hidden" name="Token" value="[FMP-CurrentRecID]"> Hi Garry, greets to Australia! Sure this works but my problem is that on this next page I have CDs listed. If someone clicks on a CD (for detail view or buying) then he gets the recID of the CD into the token and not the recID of the new order record. Can I use inlineAction to get the token filled while creating the page? kind regards PJ Wassermann
Garry Claridge Posted June 26, 2005 Posted June 26, 2005 If you are using Links to goto a listed CD then you may be able to do it with a little bit of Javascript: [FMP-InlineAction: ......., -new] <script>newrecid = "[FMP-CurrentRecID]";</script> [/FMP-InlineAction] [FMP-Record] ...List of CDs <script>print("[FMP-Field:cdname] ....<a href='FMPro?-db=....&-Token=" + newrecid + "&-find'>View Details</a>");</script> [/FMP-Record] Hope this helps. All the best. Garry
PJ Wassermann Posted June 27, 2005 Author Posted June 27, 2005 That looks like a great idea - thanks a lot! PJ Wassermann
PJ Wassermann Posted September 19, 2005 Author Posted September 19, 2005 Hi Garry I was so busy with other stuff that only now I started to come back to this problem. I tried: [FMP-InlineAction: -db=miOrder.fp5, -lay=all_Order, -new] CurrentRecID]"; [/FMP-InlineAction] No new dataset is created. What's wrong with the inline action? kind regards PJ Wassermann
Garry Claridge Posted September 20, 2005 Posted September 20, 2005 Try removing the "-lay=all_Order,"! This one works for me: [FMP-InlineAction: -db=combotest.fp5, -new] [/FMP-InlineAction] Good Luck. Garry
Recommended Posts
This topic is 7074 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