Hello,
I am almost sure I need to use an IF statement somewhere but my html coding skills are not adequate to figure this out. So looking for help.
I have the following expression for the instance_name field for my survey
concat ('<font color="green">',${address_physical},'</font>',"; ",'<font color="blue">',format-date(${violation_obs},'%m-%d-%Y'),'</font>',"<br>",'<b>',${issue_label},": ",${resolution_status_latest},'</b>')
The resolution_status_latest field contains various options, including resolved. My colleagues asked me if only those responses that are unresolved appear in the Inbox, i.e. those that have been resolved disappear from the Inbox.
Can someone help? Thanks!
Sounds like you might want to put a where clause on there, instead of tackling it in the instance name.
resolution_status_latest<>'resolved'
That's a definite possibility. You might try to calculate a field in the main form, based when resolved is entered in a repeat, then use that for your where clause?
Thats how it is set up. The resolution_status_latest field is in the main form where it is calculated based on what is entered in the repeat field.
This is the calculate expression for resolution_status_latest where resolution_status_label is the repeat field:
indexed-repeat(${resolution_status_label},${resolution_steps},${resolution_count})
hmm I don't use this too much, maybe try this:
where=resolution_status_latest<>'resolved'
https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service/#sql-92-where...clause
Not sure whats going on, I can't get it to work with '<>' or '!=' but it works with'='
So you could try the opposite, and set it to show when it equals resolution_status_latest = 'not resolved'
Or you could set it up so that field is NULL until it is 'resolved' and then for your query: resolution_status_latest IS NULL
You could set a hidden helper field to: if(indexed-repeat(${resolution_status_label},${resolution_steps},${resolution_count}),'resolved','resolved','')
The 'is null' work for me in my test
Thanks @Neal_t_k. I will try the first solution with '='. I am hesitant to add new fields since my colleagues have already collected data and adding new fields at this stage would delete all existing records.
Strangely, when I tried to use = in the where clause, all the records disappeared from the Inbox. I am going to ask Tech Support for help.
Thanks!
@dsinha Well at least it is filtering then, just not filtering right.
One more thing to try: How about instead of =, use "NOT IN" or "IN"
so something like
resolution_status_latest NOT IN ('resolved')
or conversely
resolution_status_latest IN ('othStatus1', 'othStatus2',...)