-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Has your issue been reported?
- I have searched the existing issues and confirm it has not been reported.
- I give permission for members of the FlutterFlow team to access and test my project for the sole purpose of investigating this issue.
Current Behavior
TLDR: Set Variable throws 'Current variable is not valid' when trying to check for Has Field in a document custom data type (map).
Expected Behavior
The Set Variable should accept my Has Field check in Get Document Property
Steps to Reproduce
- Create a Firestore project
- Connect it to the new project
- Add Firestore project name in FF
- Generate config files
- In Firestore, create a 'jobs' collection
- Create a document e.g. 'job_id' in
- Add a 'status' map field
- Add 'status1' array
- In FlutterFlow, create a custom 'statusMap' data type
- Add 'status1' field data type String (List)
- Create new FlutterFlow page
- Add a container
- Add backend query to get the job_id document (query collection, doc from reference)
- Add text
- Set text from variable
- Conditional value
- If jobs Document -> status -> Has Field -> status1
- Confirm
Reproducible from Blank
- The steps to reproduce above start from a blank project.
Bug Report Code (Required)
IT4oivLqy4Z1ru5E7a6Jd+9VnSQ7KUR7apEv0cpOEC0jF7KuBqQiZPTBT1VvOdfiaVNcAk2YkXwf097zhvHPCMIDAwubfos/yJB+cgn0e2itVrKuC5e0SnB6QO1QIXK51rWJ3Ap5CLRZc0Ym3TmQAeiRExHDFOu/Zwh9f6PHaOI=
Context
I have a Firestore collection with the following data structure:
jobs (collection)
[doc]
other_fields (misc. types)
status (map/custom data type in FF)
other_statuses (array/string(List))
new_created (array/string(List))
[0] specialist1_id (string)
[1] specialist2_id (string)
I want to display a conditional text based on whether 'new_created' contains any fields (i.e. any specialists seeing the job as 'new'). I added a backend query to get a job document from reference, and then I added conditional values to my text:
IF 'jobs' Document 'status' (map) Data Structure Field 'new_created' List Contains Item - true
this worked fine, but I realized I wanted to check for errors first, so I tried to add
IF 'jobs' Document 'status' (map) Has Field 'new_created'
to check whether this new_created status field exists at all first, before checking its contents. However, I got 'Current variable is not valid'.
Visual documentation



This is the first condition, which works fine, but then when trying to accomplish the following, it throws an error:

This is my 'jobs' collection schema:

This is my 'mapStatus' custom data type:

Additional Info
No response
Environment
- FlutterFlow version: 3.1
- Platform: Chrome Flutterflow desktop app/extension
- Browser name and version: Chrome 114.0.5735.199
- Operating system and version affected: Windows 11 22H2