Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 23/11/2024 Black Friday 2024

    BIG SALE, 30% discount for all our extensions. Use BF24 coupon code. Hurry up the discount is valid till 3 December.

  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Link to another ari data table?
(1 viewing) (1) Guest
Go to bottomPage: 123
TOPIC: Link to another ari data table?
*
#29303
Link to another ari data table? 12 Years, 5 Months ago Karma: 0
Is it possible to have a link in a table point to another query, to open another ari data table module? For example, I'd like to concatenate a link in one ari data table column of a table, and have information from that link used to run another query and open another table view. Does that make sense?

So...
Ordered On PO # Ship To Ship Date Cancel Date Total Amount

A user would click on an entry in the "PO #" column and it would open another table that has more detail of that record.

Is this possible?
The administrator has disabled public write access.
 
#29317
Re:Link to another ari data table? 12 Years, 5 Months ago Karma: 760
You can create an article and embed a secondary table into this article. Add link to created article into primary table and send necessary data as request variables and then use them in an SQL query of the secondary table. Request variables are used in the next format:

{$REQUEST:VAR_NAME}

Where VAR_NAME is a variable name.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#29325
Re:Link to another ari data table? 12 Years, 5 Months ago Karma: 0
So where do I define the {$REQUEST:VAR_NAME}...in the actual link to the secondary article/table? Or somewhere else?
The administrator has disabled public write access.
 
#29330
Re:Link to another ari data table? 12 Years, 5 Months ago Karma: 0
So i've done everything you mention except for this part...
"and send necessary data as request variables" in the link. Can you send show me an example of what a final link could look like that is sending data as request variable? I already have a link to the article with the secondary table, and calling the variable in the where clause of the sql query in the secondary table. Just now sure how to send the data as request variable from the primary table/link...
The administrator has disabled public write access.
 
#29344
Re:Link to another ari data table? 12 Years, 5 Months ago Karma: 760
For example if main table contains CategoryId filed and you want to show details by value of this filed in secondary table, set "Columns Settings -> ID" parameter to CategoryId value and "Columns Settings -> Format" to index.php?option=com_content&view=article&id=ARTICLE_ID&categoryId={$value} (Where ARTICLE_ID is ID of the article with secondary table) in main table settings. In WHERE clause of SQL query of secondary table, you can use {$REQUEST:categoryId} variable. A sample query:

Code:


SELECT
 *
FROM
 tbl
WHERE
 CatId = {$REQUEST:categoryId}



Regards,
ARI Soft
The administrator has disabled public write access.
 
#29360
Re:Link to another ari data table? 12 Years, 5 Months ago Karma: 0
I can't get it to work with the variable. Here's my scenario.

Table 1 Field name: Document
Table 2 Field that is in common: docnum
Link info for page that has Table 2 embedded in it:
www.logochairs.com/j25cms/index.php/account/my-open-orders?id=138

I want each value in the 'PONum' column of table 1 to be a clickable link, and when clicked, it uses the value from the "Document" field that was clicked on as the variable value, that is used in the where clause of query of Table 2.


I want to refer to this variable as "currentPo" if I can do that. Is this exactly what I should put in the "Format" column of the "column settings" in the module admin for Table 1?
index.php?option=com_content&view=article&id=138&currentPo={$value}

Also, should "Document" be in the "ID" column of the "column settings" or "currentPo"?

In my query for Table 1, this is what I currently have:
SELECT OrderDate AS 'Ordered On', CONCAT( '<a href="index.php?option=com_content&view=article&id=138&currentPo={$value}">', `PONum`, '</a>' ) AS 'PO #', Shipto as 'Ship To', Shipdate as 'Ship Date', cancel as 'Cancel Date', CONCAT( '$', `total` ) AS 'Total Amount'
FROM `openorders`
WHERE UserID = {$UserLogin}

Does it matter that "Document" isn't SELECTed in the query?

In my query for Table 2, I currently have:
SELECT *
FROM `items`
WHERE docnum = {$REQUEST:currentPo}


Is the concatenated link for 'PONum' correct in the table 1 query? I assume I have to do it this way to make it a clickable link, right?

Do I need to do anything to column settings in Table 2 at all?

Right now, the variable is not working and therefore returning no data in table 2. Can you see what I'm doing above and let me know what I am doing wrong?

Thanks so much!
Last Edit: 2012/06/24 23:27 By timw.
The administrator has disabled public write access.
 
Go to topPage: 123