Access structure on the same page by query on another structure

Hi,

I have multiple structure on the same blueprint, is it possible without JS (by saving page) to get all the id of structure ExternalMobility (id_institution) as multiple choice in ExternalPartners query ?

I try multiple query without success :

  ExternalMobility:
    label: Séjour(s) de recherche à l'étranger 
    type: structure
    fields:
      institution_name:
        label: Nom de l'institution
        type: text
      id_institution: 
        label: id
        type: text
  ExternalPartners:
    label: Partenaires
    type: structure
    fields:
      id_institution: 
        label: id de l'institution
        type: multiselect
        options:
          type: query
          query: ExternalMobility.toStructure
          text: “{{ item.institution_name }}”
          value: “{{ item.id_institution }}”
      country:
        label: Pays
        type: text
      city:
        label: Ville
        type: text
      partners_name:
        label: Nom du Partenaire
        type: text

Hi,

Have you tried using page.ExternalMobility.toStructure ?

Yes i have this error : Invalid query result data: NULL

The suggested query should work. However, there is a downside to this approach: If the options of your first field are not saved yet, then those options will not appear in the second field. In other words, there is no on-the-fly update of options.

Yes i have this error : Invalid query result data: NULL

Yes,

The fact that this is a tab content into an User page (user.txt) could explain why these query don’t work ?

Here an example of the content, i would reuse the id_institution field as key for partners array.

Ok i found by myself, arg, this is user.ExternalMobility.toStructure