M.App Enterprise Discussions

Discuss topics with other M.App Enterprise Product pioneers and experts to get the most out of it.
Showing results for 
Search instead for 
Do you mean 
Posts: 33
Registered: ‎04-19-2018

Field Action inside groups

Hi guys,


We have an ImagePicker inside a group. This group is visible depending on the value of another field.

Also we nedd to change the visibility of the ImagePicker FieldActions (PickImageFieldAction, TakeImageFieldAction) depeneding on the value of another field.


When we open the form and the group isn't visible, if we try to enable or disable the image FieldActions it says an error message: "Object reference not set to an instance of an object". I supose because the Field Actions are not initialized. But with the other fields inside the groups that are also not visibles, work fine.


If we put the ImagePicker with the Field Actions outside of the group, the same code works fine.


Here is a code sample of this case:


<?xml version="1.0" encoding="utf-8" ?>
<Form xmlns="clr-namespace:AppShell;assembly=AppShell">

    <StartupScript Name="OnFormStartup">			
if(Context.getValue('ins_ended')){ Context.setEnabled('ins_ended', false); } </StartupScript> <ChangeScript Field="ins_infr" Name="InfractionClick"> if (Context.getValue('ins_infr')) { Context.setVisible('pictures', true); } else{ Context.setVisible('pictures', false); }
</ChangeScript> <ChangeScript Field="ins_ended" Name="EndedClick"> if (Context.getValue('ins_ended')) { Context.setEnabled('ins_infr', false); Context.setEnabled('img1', false); Context.setVisible('img1_PFA', false); Context.setVisible('img1_TFA', false); } else { Context.setEnabled('ins_infr', true); Context.setEnabled('img1', true); Context.setVisible('img1_PFA', true);
Context.setVisible('img1_TFA', true); } </ChangeScript> </Form.Scripts> <Switch Name="ins_infr" Title="Infraction?" /> <Group Name="pictures" Title="Picture" IsVisible="False" IsExpanded="True"> <ImagePicker Name="img1" Title="Picture 1" SizeField="img1_size" > <DownloadImageFieldAction Name="img1_DFA" /> <PickImageFieldAction Name="img1_PFA"/> <TakeImageFieldAction Name="img1_TFA"/> </ImagePicker> </Group> <Switch Name="ins_ended" Title="(it will not be possible to edit)" /> </Form>



Thank you.







Technical Evangelist
Posts: 775
Registered: ‎11-12-2015

Re: Field Action inside groups

Hi Elisa,


This is a bug and I was investigating it already from another customer report to Support.

If you wish to have updates on that please log a support ticket to attach your case so that you can be notified when updates are provided for the bug report.