I have 2 Custom Entities:
1. Question
2. Group
Question Entity: Has a Lookup to Group Entity
Below is the fields for Question Entity
Field Name | DataType |
Group | Lookup to Group |
Group Entity: Has 2 Lookup to Group Entity
Below is the fields for Group Entity
Field Name | Datatype |
Next Group | Lookup to Group |
Previous Group | Lookup to Group |
Now I am filtering the gallery based on Collection. Below is the code of the Collection:
ClearCollect(
NextQuestion,
Filter(
Questions,
'App selector'.'App selector' = appSelector.'App selector' && IsBlank(Group.'Previous Group')
)
)
There is a button called "Next" which will load next set of Questions for the same collection.
I want to filter the collection based on "Next Group" field in the Group. Below is the Code.
ClearCollect(
NextQuestion,
Filter(
Questions,
'App selector'.'App selector' = appSelector.'App selector' && Group = QuestionList.Selected.Group.'Next Group'
)
)
"QuestionList" is the name of the gallery. This is giving me the following error "multiple levels of many-to-one relationship expansion aren't supported".
Is there a way I can achieve this?
Any help is appreciated.
Hi @tjalui :
Could you tell me:
Firstly,let me explian why you encounted this problem.
The reason for the error is as you said "multiple levels of many-to-one relationship expansion aren't supported".
Secondly,You can eliminate "multiple levels of many-to-one relationship expansion" by nesting another LookUp.
For example:
Filter(
Questions,
Group.Name = LookUp(
Group,
Name = QuestionList.Selected.Group.Name
).'Next Group'.Name
)
Best Regards,
Bof