Loading Data into a field formatting
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Loading Data into a field formatting
Hi all,
I have a small issue I hope someone can solve. I have a local database which loads the hash passwords into a password field.
I would like for the field not to show the hash rather just bullet point it out.
As the data is not being typed but loaded keydown is not used. So what solution is there for this. Is there a handler that I can use to detect the
field is not empty and convert the text?
I have tried the password font direction and the hash still come through when loaded. Could someone point me in the right direction thanks all.
I have a small issue I hope someone can solve. I have a local database which loads the hash passwords into a password field.
I would like for the field not to show the hash rather just bullet point it out.
As the data is not being typed but loaded keydown is not used. So what solution is there for this. Is there a handler that I can use to detect the
field is not empty and convert the text?
I have tried the password font direction and the hash still come through when loaded. Could someone point me in the right direction thanks all.
Re: Loading Data into a field formatting
I'm not sure to understand what you want to do.
But you could do it just after you load the password from your database. Count the number of chars, and put the same number of "*" into a field...
But you could do it just after you load the password from your database. Count the number of chars, and put the same number of "*" into a field...
Code: Select all
put empty into field "hiddenpassword"
repeat with i = 1 to the number of chars of tPassword
put "*" after field "hiddenpassword"
end repeat
Re: Loading Data into a field formatting
Thanks bangkok,
That works perfectly from the "put" point of view thanks.
But is it possible to add a field script to do the same thing.
example:
field script:
on loaddata
repeat with i = 1 to the number of chars of me
---etc
end loaddata
That works perfectly from the "put" point of view thanks.
But is it possible to add a field script to do the same thing.
example:
field script:
on loaddata
repeat with i = 1 to the number of chars of me
---etc
end loaddata
Re: Loading Data into a field formatting
Hi istech,
How about setting the font of the field to... dingbats?
Simon
Edit: Or here make your own
http://forums.runrev.com/phpBB2/viewtop ... 25&p=96468
How about setting the font of the field to... dingbats?
Simon
Edit: Or here make your own
http://forums.runrev.com/phpBB2/viewtop ... 25&p=96468
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Loading Data into a field formatting
Funny you should say that Simon.
As I tried it earlier and it was not working. But as soon as I posted I got it to work. (added space
)
I would prefer not to have to install or load or rely on a external font. If possible but it does the job.
As I tried it earlier and it was not working. But as soon as I posted I got it to work. (added space

I would prefer not to have to install or load or rely on a external font. If possible but it does the job.

Re: Loading Data into a field formatting
Hi istech,
could you please explain, HOW your user will "load" the data?
I am sure you wrote that script, right?
We surely can "hook" somewehre into the "load" routine!
Best
Klaus
could you please explain, HOW your user will "load" the data?
I am sure you wrote that script, right?

We surely can "hook" somewehre into the "load" routine!
Best
Klaus
Re: Loading Data into a field formatting
Hi Klaus,
Good day to you.
The data comes from a array. User selects a key and the data is populated into the fields.
I could do as bangkok or Simon says. But was just wondering if there was a "special handler/function" to detect data in the field and convert it. In any case the job gets done.
But always want to push the bounderires and learn something at the same time. I dont know to much about scripting fields so more about interest and learning than anything else.
Good day to you.
The data comes from a array. User selects a key and the data is populated into the fields.
I could do as bangkok or Simon says. But was just wondering if there was a "special handler/function" to detect data in the field and convert it. In any case the job gets done.
But always want to push the bounderires and learn something at the same time. I dont know to much about scripting fields so more about interest and learning than anything else.

Re: Loading Data into a field formatting
Hi.
Have you checked out the "imageSource" property? By choosing a bullet as your image, you can "hide" all your text without actually changing that text.
Craig Newman
Have you checked out the "imageSource" property? By choosing a bullet as your image, you can "hide" all your text without actually changing that text.
Craig Newman
Re: Loading Data into a field formatting
I still don't understand your logic.istech wrote: The data comes from a array. User selects a key and the data is populated into the fields.
I could do as bangkok or Simon says. But was just wondering if there was a "special handler/function" to detect data in the field and convert it. In any case the job gets done.
Since you launch a script that will load the data and populate the field... Why can't you directly act on this field, within the same script ?
Why do you want to "move" the task onto the field itself ? Since there will be no user interaction on this field ? ( the password will be displayed with bullets) ?
If your field would accept typing from the user, then of course, it would make sense to use a script within the field.
Re: Loading Data into a field formatting
Hi istech,
As bangkok said!
Hint: There is NO build-in function/message/handler that gets triggered when you put text into a field by script!
Best
Klaus
OK, and HOW is this populated? By magic, witchcraft or a script you wrote?istech wrote:The data comes from a array. User selects a key and the data is populated into the fields.

As bangkok said!
Hint: There is NO build-in function/message/handler that gets triggered when you put text into a field by script!
Best
Klaus
Re: Loading Data into a field formatting
You could easily write a handler that in fact does "send a message" when a field is changed by script, but this would be purely a matter of making LC bend to ones will.
As the others have said, changing the approach is more effective.
Craig Newman
As the others have said, changing the approach is more effective.
Craig Newman
Re: Loading Data into a field formatting
Thanks Craig, I have gone with the password font for now.
Thanks for everyones help. Any reading on field scripting or examples or links would be appeciated.
Have a nice day everyone.
Thanks for everyones help. Any reading on field scripting or examples or links would be appeciated.
Have a nice day everyone.