Hello,
Weird one today. I have a referenced feature service published and added to a map that gets used in the field. Among other things, the map has a feature class that has a relationship to an inspection table. The inspection table has attachments enabled. In Field Maps, myself and users are able to edit the parent features and add records no problem. However, we're seeing an issue where records already created are only editable if they have attachments.
There are no errors at all, but when selecting an inspection record that does not have an attachment, I don't even get the edit icon. As an example, here is a feature with two related records. One has attachments, the other does not:
As you can see, I can only work with the form for the one that has the attachments. I have confirmed this is true throughout the dataset. Poking around some other maps with similar configuration, it seems that when the related table has a popup configured using Arcade elements, this behavior reproduces, but if the related table has a popup using just a Fields List, then it does not. So for reference, here is the Arcade making the popup in the photos above:
// Format table html
var tStyle = `<table style="width:100%;background-color:#f4f4f4;">`
var trpt1 = `<tr><td style="border-bottom: 1px solid #cccccc;border-right: 1px solid #cccccc;width:50%;padding-left:2%"><b>`
var trpt2 = `</b></td><td style="border-bottom: 1px solid #cccccc;border-right: 1px solid #cccccc;width:50%;padding-left:2%">`
var trpt3 = `</td></tr>`
var endTable = `</table>`
// Create variables for checked-for-field and what their labels should be.
// Select the fields to look for
var fieldsArray = ['MaintPerformed','PerformedBy','TimeToComplete','HerbicideRate','HerbicideAmt','Notes'];
// Set the field aliases in the same order as the fields above
var labelsArray = ['Maintenance Performed','Performed By','Time to Complete','Herbicide Rate (%)','Herbicide Amount','Notes'];
var arrayLength = Count( fieldsArray );
// Set a legible date if needed
var d = defaultvalue(text($feature.date,'DD MMM, YYYY'),"Unrecorded Date")
// Set background color by hard-coding a hex value, or swap in a variable
var backgroundColor = "#83a470"
// Set header/title variable. Use a field or swap in variable
var head = `Inspection: ${d} `
// Begin final return string by setting the header and opening the table
var returnString = `<h3 style="background-color:${backgroundColor};padding-left:2%">${head}</h3>
${tStyle} `;
// If additional fields are needed outside of automated fieldsArray (such as a date field formatted for legibility), set variables and add them after ${tStyle} above
/*loops through a number of times eual to the length of the array (that's the i<arrayLength part), incrementing by one each time (i++). If the attribute if the field array is not empty
(!IsEmpty), then the value of the the variable returnString is equal the value in the fieldsArray equal to the index value of the array (fieldsArray[i]) plus the additional portion of the
return string enclosed in the curly brackets. If it is empty, then the value of returnString
*/
for (var i = 0; i < arrayLength; i++ ) {
if ( !IsEmpty( $feature[ fieldsArray[i] ] ) ){
returnString = `${returnString}${trpt1}${labelsArray[i]}${trpt2}${$feature[ fieldsArray[i] ]}${trpt3}`;
}}
returnString = `${returnString} ${endTable}`;
return {
type : 'text',
text : returnString
}
For whatever it's worth, no reference to the attachment table in the code.
Update: This has been confirmed as a BUG but I don't have the number for it yet. Apparently this had already been caught. I'll update when I have the BUG number in case anyone is following along.