Conditional visibility in field maps app not working

236
6
2 weeks ago
datadjz
New Contributor II

Hi,

I have a problem with the form visibility logic. It seems field maps does not work in combination with the visibility logic. I have tested this and below you can see the difference in forms on the same feature.

Because the form is correct in the online viewer, I think the field maps app does not deal with the visibility correctly? The same expression is used for required and that does seem to show up in the field map app.

Even if I set the visibility false without any expression or logic, the app still shows that field in the editor.

Am I missing something? I know the expression works:

var txt = $feature["PER_TARE"];
var maaironde =  $feature["maaironde"];

if (Find(maaironde, txt, 0) > -1){
  return true
}

 

Capture1.PNGfieldapp view form.jpeg

0 Kudos
6 Replies
KerriRasmussen
Esri Contributor

Hi @datadjz . I have a few questions for you. Will you primarily be using this workflow in the Field Maps mobile app, in the Map Viewer, or both? Where did you set up this logic, is it in the Map Viewer or did you use Field Maps Designer? And can you tell me more about the workflow, what is the end goal for the expression you created? 

0 Kudos
datadjz
New Contributor II

Hi Kerri,

I make the forms in the AGOL environment but different people outside (performing work and registering that via forms) are working with the fieldmaps app. Then I pull the data with an API and use FME to process the data further and send it to my client.

I have people on different locations filling the form. Each feature equals some work to be done on different types. The types are BO, TALI, TARE, WPLI, WPRE. We work in rounds and each feature can have a combination of types. If the round number in Maaironde is in the PER_(type) column the work has to be done. I dont want them to see any other options since they do not have to do that work.

For each type I have an expression that looks like this:

var txt = $feature["PER_BO"];
var maaironde = $feature['maaironde'];

if (Find(maaironde, txt, 0) > -1){
  return true
}
 
The end goal is to prevent workers outside to make mistakes in the registrations because otherwise the FME workflows need to resolve all further possible conflicts instead of the easy fix of preventing it at the start of this process.
0 Kudos
KerriRasmussen
Esri Contributor

Are you using Field Maps Designer to create your forms or are you creating them in the Map Viewer? 

I'm not quite sure I understand your workflow. Are you saying that based on the number in the Maaironde field, then you want to see the field(s) for the additional work (the field using this expression)? If that is the case, you might be better off using an if statement in your expression.

 

0 Kudos
datadjz
New Contributor II

I am using Map viewer to create the forms.

The additional field contains a combination of numbers for the rounds, that is why an if statement without the find function wont work. I cannot change that since the data comes from somebody else.

0 Kudos
KerriRasmussen
Esri Contributor

@datadjz  can you provide the troubleshooting logs for when this expression doesn't calculate properly?

Profile > Troubleshooting > View Logs >Share

0 Kudos
KerriRasmussen
Esri Contributor

@datadjz if you add your Arcade expression to that field in Field Maps Designer instead of setting up your form in Map Viewer, do you still have this issue?

 

0 Kudos