CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 How can i use the Session to control the data source filter

Print topic Send  topic

Author Message
Mario Lopez
Posted: 05/29/2005, 10:42 PM

Hi all

I would like to show in my grid only the specific user data
Table Name= Customers
I assign a customers number to each user that signs up, the LoginName in codecharge is the same than the Costumer field, i know also that when i session is created a UserID is created also,
I want to filter all records based on their LoginID, now i know you can do this through Data Source, Then use expressions with sessions, but i have no luck ,:-/:(

I also have a vendors Security groups, and a they need to have access to all they customers data in the same grid i have a row with the vendors names.

any help would be great thanks

Best Regards
Nicole

Posts: 586
Posted: 05/30/2005, 2:02 AM

Mario,
When user loges in you can store Login in session variable too. To do it open Project Settings on Security tab, click on Advanced button and enter a variable name into User Login Variable field.
Then you can filter grid on login value stored in a session. Here are sample settings for WHERE parameter
Field
Name: user_login_field_name
Type: Text (usually)
Parameter Source
Name: CCGetUserLogin() – this function returns value of login session variable.
Type: Expression

You can filter grid on security group too in a similar way. CCGetGroupID() returns session Group ID variable value.

_________________
Regards,
Nicole
View profile  Send private message
MarioLopez


Posts: 2
Posted: 05/30/2005, 2:15 PM

:-D Thank Nicole:

You are my O:) it´s working so great, my app. run flat, I am so happy, By the way THANK YOU AGAIN

Best REGARDS
MARIO LOPEZ8-)
_________________
Best Regards,

Mario Lopez
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.