June 23, 200520 yr 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
June 25, 200520 yr 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
June 25, 200520 yr Author 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
June 26, 200520 yr 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
September 19, 200520 yr Author 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
September 20, 200520 yr Try removing the "-lay=all_Order,"! This one works for me: [FMP-InlineAction: -db=combotest.fp5, -new] [/FMP-InlineAction] Good Luck. Garry
Create an account or sign in to comment