Hi All,
Have the below in an OnStart rule for my canvas app. varSurveyInstanceId is set by a parameter which is optional.
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?
Solved! Go to Solution.
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 ,
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.
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)
User | Count |
---|---|
144 | |
97 | |
89 | |
78 | |
56 |
User | Count |
---|---|
194 | |
186 | |
105 | |
99 | |
91 |