cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tiddlyplatypus
Frequent Visitor

Multiple levels of many to one expansion aren't supported - Not seeing the issue

Hi All,

 

Have the below in an OnStart rule for my canvas app.  varSurveyInstanceId is set by a parameter which is optional.

tiddlyplatypus_0-1635982494587.png

 

If(

     IsBlank(varSurveyInstanceId),
          Set(
               varEmployee,
               LookUp(
                    Employees,
                    Email = currentUser.Email
               )
     );
     Set(
          varSurveyInstanceId,
               LookUp(
                    SurveyInstances,
                    EEID = varEmployee.EEID,
                    SurveyInstance
               )
     );

     Set(
          varSurveyInstance,
          LookUp(
               SurveyInstances,
               SurveyInstance = varSurveyInstanceId
          )
     ),
// Work backwards from valid surveyInstance to get user
     Set(
          varSurveyInstance,
          LookUp(
               SurveyInstances,
               SurveyInstance = varSurveyInstanceId
          )
     );
     Set(
          varEmployee,
          LookUp(
               Employees,
               EEID = varSurveyInstance.EEID
          )
     )
);

 

I'm continuously getting the error "Multiple levels of many to one expansion aren't supported" on this block of code, and I'm not certain why or how to further troubleshoot.  I'm using variables to store intermediate values like the SurveyInstance, and EEID is a proper column in the SurveyInstance table to try and avoid this scenario.

 

Any suggestions on where I may be expanding a many to one relationship more than once?

tiddlyplatypus_0-1635982341149.png

tiddlyplatypus_1-1635982396948.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

It's set with the following:

 

Set(
varSurveyInstanceId,
GUID(
LookUp(
ROSS_HR_APPRAISAL,
CaseID = varCaseID,
SurveyInstance
)
)
);

 

This issue actually seems to have resolved itself.   I closed the editor to retrieve the app ID to log a microsoft ticket.  When I reopened the canvas app, I noticed my rule had changed itself quite a bit:

 

If(
IsBlank(varSurveyInstanceId),
Set(
varEmployee,
LookUp(
Employees,
crad7_email = currentUser.Email
)
);
Set(
varSurveyInstanceId,
LookUp(
SurveyInstances,
crad7_eeid = varEmployee.crad7_eeid,
crad7_surveyinstanceid
)
);
Set(
varSurveyInstance,
LookUp(
SurveyInstances,
crad7_surveyinstanceid = varSurveyInstanceId
)
);
,
// Work backwards from valid surveyInstance to get user
Set(
varSurveyInstance,
LookUp(
SurveyInstances,
crad7_surveyinstanceid = varSurveyInstanceId
)
);
Set(
varEmployee,
LookUp(
Employees,
crad7_eeid = varSurveyInstance.crad7_eeid
)
)
);

 

It seems that it flipped everything to system names when it re-loaded, and I no longer see the error.


Bizarre.

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @tiddlyplatypus ,

I have one initial question - is varSurveyInstanceId set before this code? If so how is it set?

It's set with the following:

 

Set(
varSurveyInstanceId,
GUID(
LookUp(
ROSS_HR_APPRAISAL,
CaseID = varCaseID,
SurveyInstance
)
)
);

 

This issue actually seems to have resolved itself.   I closed the editor to retrieve the app ID to log a microsoft ticket.  When I reopened the canvas app, I noticed my rule had changed itself quite a bit:

 

If(
IsBlank(varSurveyInstanceId),
Set(
varEmployee,
LookUp(
Employees,
crad7_email = currentUser.Email
)
);
Set(
varSurveyInstanceId,
LookUp(
SurveyInstances,
crad7_eeid = varEmployee.crad7_eeid,
crad7_surveyinstanceid
)
);
Set(
varSurveyInstance,
LookUp(
SurveyInstances,
crad7_surveyinstanceid = varSurveyInstanceId
)
);
,
// Work backwards from valid surveyInstance to get user
Set(
varSurveyInstance,
LookUp(
SurveyInstances,
crad7_surveyinstanceid = varSurveyInstanceId
)
);
Set(
varEmployee,
LookUp(
Employees,
crad7_eeid = varSurveyInstance.crad7_eeid
)
)
);

 

It seems that it flipped everything to system names when it re-loaded, and I no longer see the error.


Bizarre.

Hi @tiddlyplatypus 

Glad you got it sorted - I have closed the post.

 

(Nice handle by the way - we saw some up at Broken River near Eungella recently)

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (2,395)