Hi,
I have a custom table with a field named 'Filtertext'. This field has the following code:
Filtertext - OnLookup(VAR Text : Text[1024];) : Boolean
Text += LookupTable;
exit(true);
I want this field to act like a standard lookup in Navision. Meaning, if the user highlights the text in the field, and chooses a different text by using the lookup, the highlighted text must be replaced by the lookup text.
For example:
Filtertext is TEST
User highlights the text TEST.
User pushes F6 and chooses the text HELP
Filtertext is TESTHELP -> this is wrong because it should be HELP
Can anyone help me?
0
Comments
Text := LookupTable;
I only want to replace the text if the text is highlighted.
And as follows your wanted functionality is impossible to implement in NAV.
|To-Increase|
You'll notice that the row you're on contains the value on the request form.
And partial highlights (for example you have selected customer 10005 and you highlight 10, you'll still end on 10005)
|To-Increase|
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
-Run report 206
-Enter filter No.: I09-000001 (Or whatever your default numbering is)
-Highlight I09, and choose I09-000002 with the lookup
Result: filter No.: I09-000002-000001
If you highlight I09-000001 completely and then choose I09-000002 with the lookup, the result is I09-000002
If you don't highlight anything, the result is I09-000001I09-000002
My question is: what code is behind this function? How do I create the same function?
Hi
try
Text := Text + "your value to add";
EXIT(TRUE);
on onlookup trigger
Bye
Matteo
I think that it's not possible...this is managed by the executable, not by code.
Personally, I've never used the return value in the onlookuptrigger (Eto's Post)...maybe that is the solution..
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
I already tried exit(true) and exit(false), without any result.
Matteo
the problem is that we can't have a lookup work as the requestfilterfields...TimoBo explained what he wants sufficiently clear (i think).
if the user highlights the entire text, the value have to be overwritten, otherwise, the value will be queued
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Regards,
Slawek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
Basically setting this to "no" means you can drill down and add multiple parts in a field, to make it easy to do things like Location filter = 'RED|BLUE|WHITE' though F6.
Is this what you are looking for?
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
ClearOnLookup
Use this property to tell the system to delete the current contents of the field before it adds the value the user selects via the lookup.
Applies to
Fields, text boxes
Settings
The ClearOnLookup settings are:
To...
... Choose...
Replace the current contents of the field
... Yes (default for all fields except FlowFilter fields)
Paste into the current contents of the field \
... No (default if a FlowFilter field)
I am only grateful to have you teach me one more thing
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog