_
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
How do I detect field change?
Hi,
I looking for an "on Changed" field event, to do an action when the field value change.
Any idea to do this?
Thanks in advance.
I looking for an "on Changed" field event, to do an action when the field value change.
Any idea to do this?
Thanks in advance.
Re: How do I detect field change?
Hi sglito,
From the docs:
"Sent to a field when the focus is being removed from that field and the field's content has changed."
So this might be what you are looking for.
Best
Klaus
You need to trap the "closefield" message ideally in the script of htat field(s), check the dictionary for more info!sgilito wrote:I looking for an "on Changed" field event, to do an action when the field value change.
From the docs:
"Sent to a field when the focus is being removed from that field and the field's content has changed."
So this might be what you are looking for.
Best
Klaus
Re: detect touch of 2 controls?
Thanks Klaus,
I need to trap when the field change in any character (without lost field focus). It's for a dynamic list search depends of a field value, for example in a client list when I type "J" display all names begining with "J", when I type more characters the list is filtered for each one, finaly if the field value is "JAMES" then list show all the client names begining with "JAMES".
Regards.
I need to trap when the field change in any character (without lost field focus). It's for a dynamic list search depends of a field value, for example in a client list when I type "J" display all names begining with "J", when I type more characters the list is filtered for each one, finaly if the field value is "JAMES" then list show all the client names begining with "JAMES".
Regards.
Re: detect touch of 2 controls?
Hi sgilito,
I think you need something like that (no iPad tested)
Best regards
Jean-Marc
I think you need something like that (no iPad tested)
Code: Select all
on keydown pKey
put pKey after fld "fType"
put fld "fList" into tCont
put fld "fType"&"*" into tFilter
filter tCont with tFilter
put tCont into fld "fFound"
end keydown
Jean-Marc
https://alternatic.ch
Re: detect touch of 2 controls?
Nice sgilito,
So how do we go about refreshing the fFound field when the user uses the back space key or delete key because he misspelled a word? The delete key doesn't trigger the keydown pkey script. I played around but didn't find the right script for that part of it. Your script worked well other than that. Nice thread although it may have to be moved it oesn't seem to relate to the title "detect touch 2 Controls.
=] Dave
So how do we go about refreshing the fFound field when the user uses the back space key or delete key because he misspelled a word? The delete key doesn't trigger the keydown pkey script. I played around but didn't find the right script for that part of it. Your script worked well other than that. Nice thread although it may have to be moved it oesn't seem to relate to the title "detect touch 2 Controls.
=] Dave
Re: detect touch of 2 controls?
Hi
Best regards
Jean-Marc
Yes. rawkeydown is the wayThe delete key doesn't trigger the keydown pkey script
Code: Select all
on rawkeydown pRawKey
put pRawKey
end rawkeydown
Yes.Nice thread although it may have to be moved it oesn't seem to relate to the title "detect touch 2 Controls
Best regards
Jean-Marc
https://alternatic.ch
Re: _
Cool so yes that helped. Here is the script that makes for a pretty nice "auto populate" field when filtering based on a second hidden field of values.
on Keydown pKey
put pKey after fld "fType"
put fld "fList" into tCont
put fld "fType"&"*" into tFilter
filter tCont with tFilter
put tCont into fld "fFound"
end Keydown
on rawKeyUp theKeyNumber
if theKeyNumber is 65288 then ## the delete key is being pressed
put fld "fList" into tCont
put fld "fType"&"*" into tFilter
filter tCont with tFilter
put tCont into fld "fFound"
else pass rawKeyUp -- don't forget this!
end rawKeyUp
on Keydown pKey
put pKey after fld "fType"
put fld "fList" into tCont
put fld "fType"&"*" into tFilter
filter tCont with tFilter
put tCont into fld "fFound"
end Keydown
on rawKeyUp theKeyNumber
if theKeyNumber is 65288 then ## the delete key is being pressed
put fld "fList" into tCont
put fld "fType"&"*" into tFilter
filter tCont with tFilter
put tCont into fld "fFound"
else pass rawKeyUp -- don't forget this!
end rawKeyUp