So I've been doing, Find, Username = Get(AccountName)
Better take a closer look that method.
If you have a field in the table that records the account name and it's named "username", then this script should work:
#Script should be performed on layout based on YourTable
Enter Find Mode  //clear the pause check box
Set Field [YourTable::UserName ; get ( AccountName ) ]
Set Error Capture [on]
Perform Find 
The problem I am encountering is that it seems to be blowing right by the "Enter Find Mode "
When I try take it apart step by step to see what it is doing, If I click pause, it does stop in Find Mode, however, when I manually enter the account name the perform find is grayed out, never have seen this before.
If I enter the IWP layout normally, with the same account name (without the startup script) and manually click Perform Find, I can perform the find I want to without issue, so I know the permissions are set ok, as this account can perform finds, however, there is clearly something wacky.
I'm attaching my open script. After it goes to "Web Dashboard" it just is bringing up a random record that doesn't match the account name.
I really appreciate your second set of eyes on this.
Why do you need it to stop in find mode?
The script is not written to do that. It enters find mode, specifies the account name as criteria and performs the find. No pause in find mode needed.
The assumption behind this script is that the account names in Manage Security match the text in the UserName field in your table.
Looking at your script...
Why do you store passwords in a field in contacts? Why do you use Replace Field Contents to clear the field? Why do you have this step twice?
Ok. I figured it out.
Exporting and looking at the whole script pointed to the problem.
Also just to answer your points, and then I'll explain the problem just for resolution's sake.
- I don't store pw's. I actually just have two dummy fields, so that a bottom level user can click "change password" and it opens a layout on the same record that allows them to type in their old pw, and new pw, and then click change. IN the change script I wipe the fields after the change is complete so there isn't a record of the new PW, that middle level users would have access to.
- There is a field, not visibility to bottom level users that is triggered when a top level user creates the account in a button on the record. The button creates the account, sets a generic pw, and triggers a field to be marked as "Yes". As in "Yes" the PW needs to be changed.
- Upon login on the bottom level user, it checks to see if that field is marked "Yes", and if it is, it re-directs them to a screen to change their password. When they do, it also sets the field to "no" so that next time they login, it doesn't prompt them to change their password.
The issue is that Perform Script "Remove No Access Listings" and Enter Browse mode at the bottom of the script were too low on the list. The should be been put before the End If, under the Go To Layout "Splash Page".
Basically, it was working, but because I was doing another find, and entering browse mode at the end, what I visually saw everytime was something different. I think that makes sense. I got it working 100% with the way you and I knew should work.
Thanks for taking the time. Its totally a case of a second set of eyes, and a lot of thinking and looking outloud.
I don't store pw's. I actually just have two dummy fields,
Ok, but you don't need to do it twice and you don't need to use replace field contents. You should use Set field instead to clear the field. Replace Field Contents modifies the specified field for every field in your current found set so this could produce very unexpected results for you and could slow the execution of your script as it waits for multiple records to be updated by this step.