Jump to content

[SOLVED] look up based on session variable and editing logic problem


simon551

Recommended Posts

Hi, I'm struggling with this problem. I'm working on an intranet expense reporting application and I have expense items with 2 different expense types (overhead or client-billable) and the same with projects. I use a drop-down box at the top of the page that allows the user to select whether the expense is client billable or overhead and then a submit. The drop-downs for item and project on the page are then filtered for the type selected based on a session variable created on the 'submit' page.

This works fine until we come to the process of editing the transaction. What I would like to do is force the drop-downs to default to the type of expense that it was initially (based on the project) and then allow the user to change that if necessary using the same drop-down at the top for 'overhead' or 'client-billable.' The problem I run into is that the code I've written which looks up the type of the original transaction overrides the session variable (by design, because otherwise those drop-downs would appear blank sometimes.)

 

I'm not sure how to beat this logical problem.

Problem

 

ER Edit page

1. Item Type Setting defaults to the type that the original entry is

 

2. User changes setting by submitting to a page that creates a session variable

 

3. Then directed back and the session variable is over-written by the code at 1

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.