Select to view content in your preferred language

Show/hide certain repeats in edit mode

250
3
08-15-2024 03:53 PM
EddyClark
Frequent Contributor

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.

0 Kudos
3 Replies
abureaux
MVP Frequent Contributor

It's one of these two. I always forget which off-hand:

abureaux_0-1723819602319.png

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":

abureaux_1-1723819684615.png

 

0 Kudos
EddyClark
Frequent Contributor

Thanks abreaux.  I'm not sure I understand though.  

 

typenamecalculationrelevant
calculationheader_modepulldata("@property",'mode') 
begin repeatplant_repeats ${header_mode} = 'edit' and ${PlantStatus} = 'Endangered'
textPlantStatus  
textPlantName  
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.

0 Kudos
abureaux
MVP Frequent Contributor

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.

0 Kudos