Select to view content in your preferred language

Displaying/Filtering Options from a Survey123 Connect Form Dynamically

242
2
Jump to solution
10-10-2024 05:58 AM
NRowe
by
New Contributor

Hello all,

I have a Survey123 Connect xlsx form for signing-out vehicles. This form is linked to a feature layer that stores the sign-out date/time, inspection and repair records for a specific vehicle number. I have another form for returning the vehicle. I have both survey forms embedded in a ExB App (one page for sign-out, inspection, repairs) and the other for returning the vehicle (list/window). I used a list filter for the return form so only vehicles that have been signed out can be returned. The issue I am having is configuring the sign-out form so that only available vehicles can be signed-out.

I was able to correctly populate a vehicle status field dynamically so that once a vehicle is signed out its status becomes unavailable (1), and once that same vehicle has been returned its status becomes available (0).

I have tried many different methods to achieve this including choice filters, relevant and constraint expressions and appearance searches (i.e. choice_filter: ${veh_status}=0) Nothing seems to work and I keep coming to the same road block. After many test submissions, either the user can sign-out a vehicle that has an unavailable status or the user cannot sign out any vehicles even though their status is available. I was hoping someone could offer me some guidance on this issue, and if in fact it is possible. Is it possible to query a list of choices of vehicle numbers based on their status and do I need to somehow relate this to to a unique identifier for each record?

Is this possible to achieve using the pulldata() or search() functions?

At a loss, so any help at all would be greatly appreciated!

Thanks.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
NRowe
by
New Contributor

Thanks @ChristopherCounsell,

I ended up having to use a combination of search(), pulldata(@layer, getRecord) and pulldata(@json) functions for this to work with my survey design.

View solution in original post

2 Replies
NRowe
by
New Contributor

Thanks @ChristopherCounsell,

I ended up having to use a combination of search(), pulldata(@layer, getRecord) and pulldata(@json) functions for this to work with my survey design.