ListIndexOf parameters 'eclipsing' client action parameters
Question
Application Type
Reactive

I have a struct called Response. Response has a few fields including QuestionId

I have a block called Survey

Survey contains a local variable called Responses (type Response list)

Survey also a client action called UpdateResponses

UpdateResponses has two input parameters: QuestionId and Answer

Inside the client action UpdateResponses, I call the method ListIndexOf (from the system module) on list: Responses however, the condition does not allow me to compare the input variable QuestionId to the attribute of Response QuestionId. Both variables are addressable with 'QuestionId', thus the 'Response Attribute' QuestionId eclipses the 'Input Variable': QuestionId. (In fact I can see the input parameter Answer but not QuestionId)

Is this a glitch with my service studio? Or is 'eclipsing' actually occurring in this case? Is there a way to access it with extra scope addressing or do I have to change the name? (Normally, service studio prevents two things in the same scope to have the same name... is this a bug?)

mvp_badge
MVP

Hi Luke,


I have gone through the same situation and if I recall correctly this happens because both the attribute and the input variable have the same name.

In those cases, I usually rename the input parameter to something like QuestionId_In or QuestionId_Input to make the distinction.


Kind Regards,
João

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.