Jump to content
  • 0

Default to logged in person without using authentication parameter


Drumshambo

Question

I have a tabular report datapage called "Dashboard" that is authenticated.  It has multiple dropdown filters one of which is a personID.  The user can select the person from the personID dropdown and the results below are filtered to only show that person's tasks.  I want anyone to be able to change the dropdown filter to any person and be able to see that person's tasks in the results below. Those task records have links that let the user drill-down to targets. 

When the user clicks a link in one of the task records on Dashboard, another tabular report form called "Targets" loads showing the target records for that task. That datapage has a "back" button that returns the user to the Dashboard.  When a user clicks the Back button to go back to the Dashboard, I want the filter values (i.e. PersonID) that were previously selected there to be selected again and the results list to be filtered by those values.

I'm pretty sure I need to pass parameters back and forth between those pages to make it work correctly and I can do that. 

When a user first goes to the Dashboard, I want the PersonID filter to default to the user so I have it set to receive the PersonID from the authentication.  This works fine. 

Here is the problem. When returning to the Dashboard from the Targets screen, the PersonID filter on the Dashboard defaults to the user (probably due to the PersonID filter receiving the authentication parameter) but I want it to default to whatever was selected previously.

Hope this make sense. Any ideas?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Thanks Cheonsa, but I think I need to reformulate my question as requirements.

What I want

  1. Upon entering the Dashboard, it should automatically display the current authenticated user in the filter drop-down and filter the Task list based on that user.
  2. The user should be able to  select another person from the drop-down filter and have it filter the Task list for that person.
  3. After drilling down from a Task to its Targets and then navigating back (using a coded back button on the form), the Dashboard should remember all the filter settings (including the person) as they were before leaving the Task list.

What I don't want

  1.  The person filter should not be blank upon first entry to the Dashboard.
  2. The person filter should NOT default to the authenticated user when returning from the Targets list to the Task list unless that is how the user left it when drilling down from a Task to its Targets.

I may be misunderstanding your suggestions also but I think that my issue is more complex than the solution you offered.

 

Link to comment
Share on other sites

  • 0
On 12/6/2023 at 4:49 PM, Drumshambo said:

Thanks Cheonsa, but I think I need to reformulate my question as requirements.

What I want

  1. Upon entering the Dashboard, it should automatically display the current authenticated user in the filter drop-down and filter the Task list based on that user.
  2. The user should be able to  select another person from the drop-down filter and have it filter the Task list for that person.
  3. After drilling down from a Task to its Targets and then navigating back (using a coded back button on the form), the Dashboard should remember all the filter settings (including the person) as they were before leaving the Task list.

What I don't want

  1.  The person filter should not be blank upon first entry to the Dashboard.
  2. The person filter should NOT default to the authenticated user when returning from the Targets list to the Task list unless that is how the user left it when drilling down from a Task to its Targets.

I may be misunderstanding your suggestions also but I think that my issue is more complex than the solution you offered.

 

Your requirements are a bit more complex indeed. I have an idea for you that you may want to try but I don't have the sample to back it up if that's fine at all.

So my idea will require 2 things to be changed in your setup:

1. You need another field in the table where your Authentication is based. Name it something like "FilterPreference" or whatever you prefer.
2. If you're using the default search filters for your Task list, scratch that and create a separate search form. Similar to this idea: https://howto.caspio.com/tech-tips-and-articles/how-to-separate-search-page-and-results-page-into-two-different-webpages/

However, instead of using a submission form, use a Single Record Update DataPage so you can use it to update the table that you use for Authentication.

Here is the idea:

The idea is to store the last set filter by the user in their own record. That way whenever he/she comes back to your Dashboard, it gets what the last chosen filter is instead of having it go back to a default value. The new field in #1 will be the one where you can store the filter, and the DataPage in #2 will serve as the search form / update form to update the filter used for the currently logged in user.

To use the updated value as filter for your Task list, simply make it so the field passes the value "On Exit".

Then to save it to the right person's record in Authentication, authenticate the Single Record Update DataPage and use Record Level Security so it pulls up the record of whoever is logged in. 

Lastly, just change the destination of the Single Record Update DataPage to the same page where the report is embedded and add the parameters as query strings so it refreshes the page and applies the filter.

I hope this idea helps!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...