This topic is locked

Noob Question

8/25/2010 4:03:38 AM
PHPRunner General questions
R
realtoast author

Full discloser: I'm a complete noob to phprunner. But - to the application's credit- I'm doing well with it.
What I'm trying to do: User logs in and can only see his own records (I've got this down). Once logged in, User would only see just the customer names appearing in the initial list view. Then, when User selects a customer from the list, the CRUD form opens (or a new window replaces the list view and shows the CRUD form). User is then able to answer questions about that customer. The answer table will be simple and 2 dimensional; just simple, straight up text entry.
What I've been able to do, so far, is just the flat data table, which includes the customer name information. So, as you already know, when I open the site, the entire response for all questions for all customers shows up on the initial list page for each customer. I just want the names and the ability to select the name and then move on to the response data.
I'd greatly appreciate if you could point me to a tutorial or other information on how I might do this.
Thanks for any help!

A
ann 8/25/2010

Hi,
you need to change the following line in the HTML mode on the Visual Editor tab:

{BEGIN Username_fieldcolumn}<a href='Questions_list.php?{$custom_link}'>{$Username_value} </a>{END Username_fieldcolumn}



where UserName is your actual user field name
Fill in the {$custom_link} in the After record processed event on the Events tab:

$record["custom_link"]=$data["UserName"];



Also to show only the records of the picked user modify the code in the Before SQL query event on the Events tab of the Questions table:

$strWhereClause=whereAdd($strWhereClause,"UserName=".$_Request["a"]);
R
realtoast author 8/25/2010



Hi,
you need to change the following line in the HTML mode on the Visual Editor tab:

{BEGIN Username_fieldcolumn}<a href='Questions_list.php?{$custom_link}'>{$Username_value} </a>{END Username_fieldcolumn}



where UserName is your actual user field name
Fill in the {$custom_link} in the After record processed event on the Events tab:

$record["custom_link"]=$data["UserName"];



Also to show only the records of the picked user modify the code in the Before SQL query event on the Events tab of the Questions table:

$strWhereClause=whereAdd($strWhereClause,"UserName=".$_Request["a"]);



Thanks, Ann. This appears to be exactly what I was looking for. I will toy with this today as I continue my build (just started my idea for this site yesterday).