Do not show lookup-arrow on form

I have created a form, based on a table (obviously). Let’s say one field of that table that shows on the form has a TableRelation to another table (defined on table level). Automatically, when you click on the field on the form, the lookup-arrow shows and you can open the related table. I would like to make this “LookUp” impossible on the form, but I need it on the table in order to validate the possible entries. Any suggestions? Thanks in advance.

hi Markus You can set the properties LookupFormID = undefined Location List = undefined of the related table. by this the user cannot open the table from the arrow mark you have mentioned. and it will take care of all the validations too. WR Hari

Hi Markus On the form if you look at the properties for the textbox properties for the field, there is a Property called LookUp set this to NO, this should do the trick.

@Stephen, I already did this, but the arrow still shows and the lookup still works! @Hari, if I do that I will not be able to use the look-up on the table, which I would like to do when entering values into the table. I think I forgot to mention, that the lookUp should work on the table (when doing RUN) but not on the form displaying the table entries!!

Markus I have done this a few times and I haven’t had any problems. I have disabled Lookup and DrillDown on various fields on forms. eg. “Field A”(Textbox) on Form Properties. Property Value … Lookup No DrillDown AssistEdit DropDown … SourceExpr “Field A” TableRelation ValidateTableRelation LookupFormID DrillDownFormID … Table Properties for “Field A” Property Value … TableRelation “Table A” ValidateTableRelation TestTableRelation

hi steve, i guess the property you have mentioned work only on flowfield. you can write code to open the look up form where u require . write the code on OnLookUp Trigger of the field. this will work fine. WR Hari

Hi Hari, the lookup property works on normal field as well. Markus , if you check again the lookup property of the field set it to NO because the DEFAULT VALUE of the property is NO but it doesnt work if you dont go and set it to NO. CHEERS

Hi Hari No the fields have been normal fields for the Lookups. Yes i have switched off the drilldown arrow the same way on a flowfields, when the flowfield has been a Lookup to a name. Opening up the “Customer Card” in Design mode, Click on “Salesperson Code”, Properties set Lookup to No not then CTRL+R to run card then look at or click on salesperson code the Lookup arrow will not appear.

Hi Bobby, THAT was it!! The default value of the property does not work. Excellent. Thank you!

hi all a general question. do all the default vlaues does not work. what i mean is that do we have to activate the default values if we want them to work. WR Hari

hi Hari, No it doesnt mean the default values doesnt work. it does works. it works like initial values assigned to properties. say in this case if its a normal field without having any table relation at table level then there should not be any lookup button for the field thats why its set to no. But if you change anything on the base you will have to change the default value. cheers,

Strange. I tested it out on the Customer card as suggested, and it worked perfectly. But now, I have a FlowField on another form that I cannot get this to work. Forced the Lookup property to No, but it still shows the lookup. Any thing else to look for?

If you really want to get rid of the Lookup or Drill downs, just go the the OnLookup, and add the following code OnLookup //

Hi Torolf On a Flowfield you will need to Set DrillDown to NO.

David I think if you add code to the OnLookUp trigger it will still display the Lookup Arrow button, but you will not be able to do anything with it.

Stephen, that worked. Makes perfect sense now that you mentioned it. In terms of the OnLookup trigger, when I tried it, I actually got a drill down and a lookup arrow at the same time, expect one of them didn’t work.

[:I]

quote:


Originally posted by stepheng
David I think if you add code to the OnLookUp trigger it will still display the Lookup Arrow button, but you will not be able to do anything with it.


Yes, Stephen, I don’t even need to go to Navision to know I was wrong. Well it happens. [V]