Looking for a way to hide certain repeat rows while using mode=edit.
I have my parent table and repeat table. If the value in the repeat meets a certain criteria, then show it. If not, then don't show it.
For example I have my parent table (project site) and repeat table (plant observations). If the plant status = 'endangered', then I want them (and only them) to show in the web form.
It's one of these two. I always forget which off-hand:
Just tie your relevant question to the state of this question.
EDIT: I realized I literally had a screen in front of me with that info... It's the obvious answer of "mode":
Thanks abreaux. I'm not sure I understand though.
type | name | calculation | relevant |
calculation | header_mode | pulldata("@property",'mode') | |
begin repeat | plant_repeats | ${header_mode} = 'edit' and ${PlantStatus} = 'Endangered' | |
text | PlantStatus | ||
text | PlantName | ||
end repeat | |||
In case it got lost in translation, the parent might have several children - some endangered, some not. When I enter into edit mode I want the form only to list those that are endangered.
Oh, so you want to filter your repeat. That isn't strictly supported*.
Also, you can't have ${PlantStatus} as a relevant parameter because it is contained within the repeat. You can/should only call on items outside the repeat or you will (or at least should) get a circular reference warning.
*You can use the Inbox to get the behaviour you are looking for I believe. But, first question you need to ask yourself is "can I use the Inbox feature?". Assuming you can use the Inbox, query is added to bind::esri:parameters and works as follows:
query: Used to fetch related records and populate repeats. If query is not used, surveys from the Inbox will not display any repeat information from the existing feature. You can also control which records should be fetched, by defining a where statement for your query. For example: query="status='needs_repair'" will populate the repeat with all related records where the status is set to needs_repair. If no where statement is passed, the query parameter will fetch all related records.