cancel
Showing results for 
Search instead for 
Did you mean: 

Form Mode changes to Update mode

Former Member
0 Kudos

Hi,

I have a user defined form with 5 tabs.

As soon as I click on 2 particular tabs, if Form is in OK mode, it changes to Update mode.

Even before the control comes to the Add-on's ItemEvent it changes to Update mode.

Also, I get the message "Changes will be lost", when browsing thro' records. Even when the form is in OK mode, I get this message.

I tried setting AffectsFormMode=false for all the controls.

Please help me with your inputs.

Thanks in advance.

Regards,

Geetha

Accepted Solutions (1)

Accepted Solutions (1)

former_member201110
Active Contributor
0 Kudos

Hi Geetha,

How are you generating your form (ie XML or via code)? The AffectsFormMode is the correct way of dealing with this. However, a folder object actually has 2 AffectsFormMode properties. One is part of the item and one is a property of the folder specific properties.

For example, here is an extract from a srf file for a folder:


<item uid="MyFolder" type="99" left="7" tab_order="0" width="120" top="72" height="20" visible="1" enabled="1" from_pane="0" to_pane="0" disp_desc="0" right_just="0" description="" linkto="" forecolor="-1" backcolor="-1" text_style="0" font_size="-1" supp_zeros="0" AffectsFormMode="0">
	<AutoManagedAttribute/>
        <specific caption="Scheduling" AffectsFormMode="0" val_on="Y" val_off="N" pane="0">
        	<databind databound="1" table="" alias="FolderDS"/>
        </specific>
</item>

As you can see, the AffectsFormMode property appears twice so you need to make sure you set both to 0. If you are setting the property through code, there is only an AffectsFormMode of the Item object so this might be why setting the property to 0 through code doesn't work. I'd always recommend that you create your forms in XML (ie an srf file created through Screen Painter) as it's faster and more flexible.

Kind Regards,

Owen

Former Member
0 Kudos

Hi Owen,

This is very useful information.

I will try it and let you know.

Thanks for your time.

Regards,

Geetha

Answers (1)

Answers (1)

Nussi
Active Contributor
0 Kudos

Hi,

you can set

oForm.AutoManaged = False

but than you have to handle the FormMode by yourself

regards

David

Former Member
0 Kudos

Hi David,

This is a useful information.

Even though I could not possibly use it now,because of the complexity of the project and the nearby deadline, it will be useful for me in the future.

Thanks.

Have a nice day.

-Geetha