Select to view content in your preferred language

Can't use switch input or default values in Field Maps

1077
4
11-01-2022 05:34 PM
AaronCole1
Regular Contributor

I've tried seven ways from Sunday to get this to work and I'm stuck. Running Enterprise 10.9.1, have a referenced point feature layer with a related table. The point feature layer holds features of interest, once selected, field technicians will enter an inspection in the related table. Relationship class is established and functional,1:M. Long story short, I have a bunch of binary Yes/No fields that I want to have activated as switch inputs in the app, something I’ve accomplished previously, but I can’t get this data to cooperate.  The successful implementation was a hosted feature layer with a table that was already populated and being edited, as opposed to a table having records inserted. I  have domains set on the fields, I’ve tried text and integer coded values with no success. I have default values set on the fields. The feature template works as expected in Pro (attribute rules are triggered, default values populate as outlined), but when I insert a record in Field Maps the Yes/No fields start out empty, whether or not I allow Null values or set the field as required in the Field Maps form editor, and will not ever populate a switch input, only a combobox or radio.  I've also tried pushing the data into the data store as using a hosted feature service...still, no switches. I’ve run out of configuration options, thus ideas. Anyone?

0 Kudos
4 Replies
JustinReynolds
Frequent Contributor

You say the fields start out empty?  Have you checked your feature templates... are the default values showing up there as expected?  For the domains on the pseudo-bit fields (e.g. yes/no) that are for your switches, are there there only two options for each of those domains?  If there are more than two options you may not have the option to use that field as a switch and if the feature template is not configured to set the value to one of those options then it may not appear as a switch when rendered.

- Justin Reynolds, PE
0 Kudos
AaronCole1
Regular Contributor

Hi Justin,

I've published versions of the table both with records and empty, neither worked. In both cases the feature templates, honored the default values, at least during record insertions in ArcGIS Pro. The domain only has 2 options, No and Yes.

0 Kudos
DallasCrow
Occasional Contributor

The switch input won't display until default values populate in Field Maps. I've resolved this problem before in a few ways, hopefully one works for you.

  • Are there any records currently in the table that don't have a Yes/No value? If so, populate them. Switch inputs require every record to have one of the two list values.
  • Was the table template configured before publishing? If not, you may need to overwrite the web feature layer for it to honor the default values.
  • Make sure default value matches one of the values on the domain list, and that the domain list has only two values to choose from.
0 Kudos
HollyTorpey_LSA
Frequent Contributor

I'm having the same problem with a feature service published from Pro. It's actually a duplicate of another feature service that I created in AGO and that works fine with switches. In this case, I had exported the AGO feature service to a GDB in Pro and then published it back to AGO (why, you ask? This is why.).

For some reason, none of the fields in the new layer with Yes/No domains and a default of No will display as switches. However, if I add a new field in AGO and give it the exact same default value and domain values, the new field works fine with a switch (even though it's a brand new field and thus has nothing but null values in the table). So now I'm in the middle of the process of adding all the fields in AGO, updating my forms, calculating the field values in Pro from the original fields, and then deleting the original fields. Sigh.

- Holly