PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Passing in a variable to a iNomads transaction  (Read 1646 times)

Bob Sosbee

  • Member
  • **
  • Posts: 12
    • View Profile
Passing in a variable to a iNomads transaction
« on: July 27, 2018, 04:01:03 PM »
I want to create a clickable link from a report or email that when clicked will invoke the iNomads transaction that I want.  Currently, the link looks like http://bobtest.asifocus.com/?txid=testOrderMnt.pvx.

Can I add anything after the link like "?arg_1=MD" and would that pass in as arg_1$?  Something like http://bobtest.asifocus.com/?txid=testOrderMnt.pvx?arg_1=MD?arg_2=2018072412345rcO

Mike King

  • Administrator
  • Diamond Member
  • *****
  • Posts: 3532
  • Mike King
    • View Profile
    • PVX Plus Technologies
Re: Passing in a variable to a iNomads transaction
« Reply #1 on: July 27, 2018, 04:46:46 PM »
No problem, the %inomads object includes properties/methods that can be used to access the argument list that was included with the original URL.

These include:

  • %inomads'Url_Arg$(argno)
    Returns the URL argument/parameter indicated by argno. If no parameter is present at the specified argno, an Error #42 will be generated.
  • %inomads'Url_Arg$(name$)
    Returns the value assigned to the specified URL parameter or "" if not set.
  • %inomads'Url_Arg_Cnt
    Number of parameters found on the URL line.

So for your example you could set ARG_1$=%inomads'Url_Arg$("arg_1").

More information about inomads properties and methods can be found at this link

Mike King

  • Administrator
  • Diamond Member
  • *****
  • Posts: 3532
  • Mike King
    • View Profile
    • PVX Plus Technologies
Re: Passing in a variable to a iNomads transaction
« Reply #2 on: July 30, 2018, 11:16:46 AM »
One quick note, on reviewing your original post you have the URL wrong.  In your post you asked about

http://bobtest.asifocus.com/?txid=testOrderMnt.pvx?arg_1=MD?arg_2=2018072412345rcO

A question mark (?) separates the site URL and its parameter list which is referred to as the query_string
For iNomads subsequent parameters should be separated by the ampersand (&) character. 
This is standard for most web sites.  (ref https://en.wikipedia.org/wiki/Query_string)

So your URL to work under iNomads would need to be:

http://bobtest.asifocus.com/?txid=testOrderMnt.pvx&arg_1=MD&arg_2=2018072412345rcO

Bob Sosbee

  • Member
  • **
  • Posts: 12
    • View Profile
Re: Passing in a variable to a iNomads transaction
« Reply #3 on: August 01, 2018, 03:20:14 PM »
Cool!  That clarifies what I needed.  Thanks!