Gossamer Forum
Home : Products : DBMan : Installation :

Listing 'open' cases on login

Quote Reply
Listing 'open' cases on login
I'm trying to design a workstack system.

When the user adds work to the stack their username is recorded.

When they then log back in later to their main page i would like them to see the status of all work they have added.

Kind of an embedded set of search results in the main page.

Any ideas ?
Quote Reply
Re: Listing 'open' cases on login In reply to
I'm afraid I'm even more confused than before. Smile

Let's start at the beginning. What is your database for? What do you want to happen when users log on?


------------------
JPD





Quote Reply
Re: Listing 'open' cases on login In reply to
I would need more detail about what you are trying to do -- what fields do you want to search on, for example?


------------------
JPD





Quote Reply
Re: Listing 'open' cases on login In reply to
Mainly on the user field (the one populated with the username) so when a user logs in all the requests they've added would be displayed.

If possible with the ability to specify a date as well, so an AND case as username = user X and all requests added by that user in the last 30 days (although i would be happy just to work out how to do the basic one).

I dont know how well i've explained this, hope you can help.
Quote Reply
Re: Listing 'open' cases on login In reply to
Okay. I think I've got it.

In sub html_home, add

Code:
$in{'Userid'} = $db_userid;
my ($status, @hits) = &query("mod");
my ($numhits) = ($#hits+1) / ($#db_cols+1);
my ($maxhits);
$maxhits = $db_max_hits;
$nh = 1;

if ($status eq "ok") {
for (0 .. $numhits - 1) {
print "<P>";
&html_record (&array_to_hash($_, @hits));
}
}

The only time I can see that you might run into a problem is if a user has more records than the $db_max_hits value that you defined in your .cfg file.

Be sure to change Userid to the correct field name for your userid field.



------------------
JPD





Quote Reply
Re: Listing 'open' cases on login In reply to
Ok here goes :-)

The database is a workstack system, it allows people from another team to put in work requests for work to be done by our team.

The "visitors" apply for their own account and then add the work via the add form, populating about 10 fields, another 10 admin fields are populated by the system, this includes the "visitors" userid.

When the visitor logs in i would like to be able to list all the work they have added on the main page (the first one past the login screen). This way they can see the status of their work, since one of the columns is a % complete column.

So ideally i would like the results of a simple search for all requests = userid for the userid of the person logged in.

If you can show me how to do this i can work out how to do the rest of the stuff i need to finish this off and get it used (we'll be buying a license once we get it working).

Hope that makes it a bit clearer.
Quote Reply
Re: Listing 'open' cases on login In reply to
Okay. Now I understand. Smile

I'm going to go to bed, since it's almost 5am here. I'll get to it when I get up.


------------------
JPD