R2i DotNetNuke® Forum

R2i wants you to have the opportunity to ask questions, post reviews, help others or just rant and rave about DotNetNuke® or any of the R2i Modules and Skins. Our team spends hour upon hour, day after day, working on custom DotNetNuke® modules and services; please feel free to ask us anything.
 
Example of Grouping with lxExpander
Last Post 01 Jan 1900 05:00 AM by . 9 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Informative
pauldesUser is Offline
Veteran Member
Veteran Member
Posts:1392

--
02 Sep 2006 04:41 PM  
This is a simple ListX that shows how to implement lxExpander client utility. It allows dynamic expansion of a row to show and hide table rows beneath the parent row. Basically a group by function.

Files in CarsGroup.zip

CreateCarsTable.SQL - USE ONLY IF YOU HAVE NOT INSTALLED THE MyFirstListX sample in this forum. Run this script with a query tool or from HOST>SQL, to install the application table to your DNN database.

PopulateCars.SQL - USE ONLY IF YOU HAVE NOT INSTALLED THE MyFirstListX sample in this forum. Follow same procedure as CreateCarsTable.SQL

CarGrouping.xml - the ListX module. Add a new page to your site. Add a ListX module. From the module menu choose View Options. Click the XML icon. Replace ALL text in the XML text field with the contents of this file. Click the LOAD link. Click the SAVE CONFIGURATION link.

**NOTE** the Link column in the ListX results will not work until you set the tabid in the ACTION statement to the record edit page on your site for the MyFirstListX sample.

Attachment: Car Grouping.zip

ListX....makes you look brilliant, even though you're not.
radamsUser is Offline
New Member
New Member
Posts:18

--
02 Oct 2006 05:28 AM  
Hello,
I am running into issues that have been very confusing with regard to these queries until I realized that they relate to the child portal I am trying them in. Is there a system tag such as [ModuleId,System] for the identification of which portal you are running from I attempted [PortalId,System] but it didn't work.
eg.

<select name=""flddnnownerid"">
\{SUBQUERY,
Name=""qry_flddnnownerid"",
Query=""SELECT username, userid from users union
select '*Select' as username, 0 as userid ORDER BY 1"",
Format=""<option value= '[userid]'>[username]</option>"",
SelectedFormat=""<option value='[userid]' SELECTED>[username]
</option>"",
SelectedField=""userid"",
SelectedItems=""[FORMAT,[flddnnownerid,Form],{ISEMPTY:
[dnnownerid]}]"",
UseCache=""False""\}
</select>

I added the join criteria for identifing the child portal "8" in this query, and made sure they were authorized.

<select name=""flddnnownerid"">
\{SUBQUERY,
Name=""qry_flddnnownerid"",
Query="SELECT U.UserID userid, UP.PortalId, U.Username
username, UP.Authorised
FROM dbo.Users AS U
LEFT OUTER JOIN dbo.UserPortals AS UP ON U.UserID = UP.UserId
where UP.PortalId = 8 and UP.Authorised = 'true'
union select 0 as userid, 8, '*Select' as username, 'true'
ORDER BY 1"",
Format=""<option value= '[userid]'>[username]</option>"",
SelectedFormat=""<option value='[userid]' SELECTED>[username]
</option>"",
SelectedField=""userid"",
SelectedItems=""[FORMAT,[flddnnownerid,Form],{ISEMPTY:
[dnnownerid]}]"",
UseCache=""False""\}
</select>

although this still doesn't work


pauldesUser is Offline
Veteran Member
Veteran Member
Posts:1392

--
02 Oct 2006 12:16 PM  
What's the debug error?


ListX....makes you look brilliant, even though you're not.
radamsUser is Offline
New Member
New Member
Posts:18

--
02 Oct 2006 03:45 PM  
Well with this part there is no error, just every user from every portal is listed in the dropdowns, I need to select just the active users from this child portal, and then beyond this point I will need to display just those users who fit a particular role.


radamsUser is Offline
New Member
New Member
Posts:18

--
02 Oct 2006 03:55 PM  
Also I realize that this should all be in the "Inline Record Editor With AJAX" thread


pauldesUser is Offline
Veteran Member
Veteran Member
Posts:1392

--
02 Oct 2006 04:02 PM  
What id the ACTUAL sql in debug for the SubQuery Debug link?

Maybe you need to set the General option Use Explicit System Variables?


ListX....makes you look brilliant, even though you're not.
MichelleUser is Offline
New Member
New Member
Posts:43

--
29 Oct 2007 04:11 PM  
Hello Paul

What does the header [make] do?


Michelle Chan
robert_chumleyUser is Offline
Advanced Member
Advanced Member
Posts:592

--
29 Oct 2007 04:16 PM  
Hello Michelle,
Can you please expand a little on your question?
Thanks,
Robert Chumley
R2Integrated


Robert Chumley<br>r2integrated (formally bi4ce)
MichelleUser is Offline
New Member
New Member
Posts:43

--
29 Oct 2007 04:42 PM  
It's ok. I find it out. Thanks for the answer.

[make] is the database field I can put it as a header.

That's also a nice exemple for grouping data.


Michelle Chan
robert_chumleyUser is Offline
Advanced Member
Advanced Member
Posts:592

--
29 Oct 2007 05:10 PM  
ok great! Let me know if I can help at all.
Thanks,
Robert Chumley
R2Integrated


Robert Chumley<br>r2integrated (formally bi4ce)
You are not authorized to post a reply.

Active Forums 4.1
 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seatle, WA • 410.327.0007 • info@R2Integrated.com

Bookmark & Share Bookmark and Share