Link to home
Start Free TrialLog in
Avatar of j_rameses
j_ramesesFlag for United States of America

asked on

Notes and task does not clear out of the display panel after being read

In our database for filemaker, when a user logs into their account, they go to the home page where they first see notes and emails sent to them via filemaker. After the user has read the email or note, they click on the clear button that acknowledges that they read it and it disappears from their display.  All our users it appears to work, except for new employees hire by the company. It used to works for the new employees if they use their desktop, but the moment I put them on VMware virtual desktops, that feature no longer works for them. It works for every other employee except that last four new employees the company hired.  Most of our employees are using virtual desktops and they do not have that problem, its only the last four employees if they use a virtual desktop. I have to manually go in and clear the notes for them via portal on my end.  how can this be resolved since it takes much of my time to clear those old notes and it gets bothersome, having the same four employees complaining that they have to scroll down to the bottom of the portal.
SOLUTION
Avatar of Will Loving
Will Loving
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of j_rameses

ASKER

Will, strange thing comes about. I logged in with my vm machine, and used his credentials and I was able to clear the notes.
I then had him log into a different user's vm machine that was already active for that use and had the troubled employee use his filemaker credentials and he was able to clear his notes.
I then asked him to go back to his own vm machine and try to log into his filemaker and clear the notes again, but he was unsuccessful.
I am thinking it may be a Windows thing or maybe a filemaker install thing.
I will set up my system to re-install filemaker on his machine to see if that takes care of the issue or if it still remains.
If it does, it may be a windows issue.
Below line is the code used to clear the notes:

Set field [Notes::kf_AccountNames; AddValues ( Notes::_kf_AccountNames; Get(AccountName) )]
Go to field[]
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Will, did a little more testing.

Had the problem user log into a different vm machine used my another employee: he was able to clear his notes(successful).
I used the vm machine from the problem user(his windows session), I logged into filemaker under my credentials: I was able to clear my notes(successful).
I used my windows session and used his filemaker credentials, notes were cleared(successful).
I re-installed a new copy of filemaker to problemed user, he logged into windows his credentials, I logged into filemaker my credentials, notes did clear(successful).
Then I logged out of filemaker and had him log into filemaker with his credentials but the notes did not clear.

That user does not have filemaker advanced, our employees are usining filemaker pro 13.

I will try above code you shared to see what happens.

Does the information I provided give you more information on what the problem can be?
Will, the error message displayed is a zero: 0
An "0" error means, "no error". Going back to my original thinking then and related to your testing, I suspect there is something different about the new employees Employee records or AccountName that is different from the old ones. If on the same install and VM, your credentials work and the new person's do not, then that points to a difference between you and them rather than an issue with Windows or VM. That's my best guess anyway.

Try creating a new fake employee and see if the issue is replicated. Keep everything else the same, just new versus old.
Will, not sure if I put on my above notes, but I did create a new employee and was able to clear up the notes from my end.
I will now attempt to see if I can do it from his machine.
Will, just tested the new user account on the problem vmdesktop from myuser and was able to clear out the notes logged into filemaker with that new user.
Hmmm... well, I keep coming back to some difference between the new and old employee records and how the notes are being created or cleared, or perhaps how the AccountName is being set or cleared.

Looking at your Set Field that "clears" the note, I see you appear to be using a Custom Function, "AddValues". I'm not familiar with this function and a Google search turns up nothing so I assume it's something you created. Could this be part of the problem? What does the AddVaules CF do?
Below is the code for function "AddValues":

Let([
     items =  ¶ & listOfvalues & ¶;
     newitem = ¶ & valueToadd & ¶
        ];

If (
PatternCount (items ; newitem );
    Substitute ( listOfvalues;


   [¶ & valueToadd & "|1"; ""];
   [valueToadd & "|1" & ¶; ""];
   [¶ & valueToadd & "|1" ; ""];
   [¶ & valueToadd & "|1" & ¶; ""];
   [valueToadd & "|1"; ""];

   [¶ & valueToadd ; ""];
   [valueToadd & ¶; ""];
   [¶ & valueToadd  ; ""];
   [¶ & valueToadd & ¶; ""];
   [valueToadd; ""]




                     ); List ( valueToadd;listOfvalues )
         ))
Is the goal of this to determine if the new value is already part of the "listOfValues" and to only add it if it is? Please explain because I think there may be a lot easier way to do it...
Bill, that function was created by a previous FM writer years ago.
Looking at the code of that function is my first time.
It looks a bit confusing.  The previous coder wrote some code in a way that was hard to decipher and left no notes.

The way the "Read" button when selected is suppose to work is that when it is clicked, it should copy the name of the account user and delete it from the list of all account names on the list.

This way it clears out their name and that note/message is no longer on their home page.

You mention you have an easier way of doing that, do please share.
There are certainly easier ways to do that. Please show me the entire script for the "Read" function so I can see all of what's happening. From what you've said, is this correct:

1. There is a field called Notes::kf_AccountNames which contains a list of everyone who needs to read a particular Note

2. When you click "Read" checks your account name and removes it from the list of names

3. Once your AccountName is removed from the List, you no longer see the note
You are correct Will.
See below code:
Set field [Notes::kf_AccountNames; AddValues ( Notes::_kf_AccountNames; Get(AccountName) )]
 Go to field[]
---------
That's all the script has besides the error trap that you asked me to put in place.

I started doing a script now with an custom dialog to display what it does while I debug it, the new script that is.
So I started by creating a variable to hold the current account name, and another variable to copy all the account names on that specific note.
I thinking of doing a search within the second variable and deleting the first variable value from the second value of the variable.

Let me know what you think or suggest.
I am not familiar with stripping out values from another field.
Never did that before
The previous developer has clearly used FileMaker Pro Advanced to install a Custom Function. Do you have FM Advanced so that if I give you a solution that involves a Custom Function you could install it?
Yes, I have a advanced.
Been working on a code to extract the current account name from the string but I have been unsuccessful at it.  All I get is the extracted or filtered value. Could not find a function that strips out a textstring.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Will, thank you.
I tried it both ways.
It works for everyone else, except the original problem users.
I even changed the filemaker permissions to the same as the other working users and it still did not work.
I had him log off filemaker and then log back in.
Maybe , I should get him to log out of his vm machine and then log back in to see if that works.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
found the issue as per your instructions.
his account name gets the first two letters capitalized.
it should all be lowercase.
all other users that work are lowercase for account names.
I checked under his employee layout and security settings and they are lowercase.
For some strange reason he gets stamped with the first two letters capitalized while everyone else gets lowercase
Will, how can I go about fixing that issue. I checked on the employee table and security policies for the filemaker securities and I see it in lowercase.
I am stumped, that is weird.
On our _log, anything he does it gets his first two letters capitalized.
You need to go to File > Manage > Security and check his actual user account. That is where Get ( AccountName ) is drawing from. It doesn't matter what the employee table is set to, security is or at least should be being handled by the user accounts in FM.
Will, his privilege set is all lowercase.
That is why I was perplexed.
Maybe some time in the past it was created with a first two letters cap and then changed to lowercase.
I wonder where else it is holding the value.
I was thinking about using the function to lowercase the account name.
Is there a place besides security where it may hold the value besides another table?
Is there a way to flush it from caps to lowercase or flush to the new value in security settings?
Things to look at/try:

1. Look at the Startup script for the file and see whether login is  happening solely using FileMaker's login functionality or if there is something else going on that might be using a table somewhere. If you see a Custom Dialog script step that is asking for username and password then it may be using the Employee table rather than FileMaker's security.

2. Delete and recreate his account

3. Make sure authentication isn't using LDAP or Windows security to login instead
Will,

1)  I checked the start-up script, nothing that points to the account name, only that it places it in a variable for the home page.
2) If I delete his security account and re-create it, will it affect any of his files that were created via his name and other records that have a timestamp with his account name?
3) I checked settings, and it is using filemaker as the authenticator.

Will, I changed the code you shared with me to look as:
-----------
Let (
 a = Substitute ( Notes::_kf_AccountNames & ¶ ; Lower (Get ( AccountName )) & ¶ ; "" ) ;
 Left ( a ; Length ( a ) - 1 ))
---------

If deleteting his account and recreating will affect our database timestamps, can I opt to use the "Lower" function?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you Will. Just heard from  my employee that he is able to clear his two months of notes out now.  I did create a button that clears all the notes at once via a loop. This way he does not have to click on over 100 notes.  That would be tedious. :-)
I will attempt to do your above suggestion in continuing to find where it is stamped.
I do know that when a record is modified, our z_logs on bottom of each layout does display his name as "RObert smith".  When I do check to see where that field is taking that value, it points to account names.  But account names has him in lowercase.  We do have another user that is in caps as "RObert smith".

I will come back to this question next week with my results and assign points.  I hope you do not mind.
I have other projects that came to my table that I must address.
But this one really helped out a lot.
My employees were getting restless that they had to scroll through so many notes to see what they were looking for.
Thanks  a million.
No problem. Perhaps followup with another question since we've got at least some sort of solution here.
Bummer, I tried to change the zlogs for modify account and it placed my information, it wont let me put his name back. I accidently chose modify versus create.
I will address that later. No need for me to worry cause I do not create that type of record, soI will have to find a way to modify that field back to his name. I'll ask him to goes to those three records affected and make a change himself so it replaces my name.
It may be that there is a restriction on the field in Define Fields or Privilege sets
Hello Will, I have been chasing the rabbit down the rabbit hole and can not find why it keeps stamping the records with caps.  I will continue my search tomorrow. I will keep you updated.
Hang in there, it's there somewhere. Ah! Go into FileMaker Preferences on the user's machine and look under user name. By default it takes the name of the computer but you can override it. It someone overrode it and typed in the name with two caps it may be pulling it from there.
Thank you Will, you were great help.
I never deleted the account cause I had been pulled to a different project which will last another two weeks. So figure I close this so you can be rewarded. I will reply back my final response after I have the chance to delete the account and re-add it.
One other possibility is that the field you are looking at it set to show the result account name in all lower case, using either Lower( Get ( AccountName ) ) or simply having "Lowercase" selected in the Inspector. In layout mode, click the field, and then look at the Inspector > Appearance Tab > Text > Style
Hi Will, this is a follow-up to the issue that the username was being stamped "JDoe" rather than "jdoe".
After searching through FileMaker, I went to Windows settings for the specific user and found that his username was created with caps.  Once I corrected that issue, I took a look at filemaker and his new records stamped correctly with lowercase.

Thank you for everything.
Also, I posted a new question for filemaker regarding relational value list today.