Error : public location reference

Hi,

(Assign) QueueItemsTemp = QueueItems.Where(Function (x) x.Reference.Equals(“FindString”))

it works well, but below have got error

(Assign) StringVariable = “FindString”
(Assign) QueueItemsTemp = QueueItems.Where(Function (x) x.Reference.Equals(StringVariable ))

Error message : Write Line: Activity ‘1.5: VisualBasicValue’ cannot access this public location reference because it is only valid for activity ‘1.10: VisualBasicValue<IEnumerable>’. Only the activity which obtained the public location reference is allowed to use it.

@Suhyeonyoo - you can try StringVariable.ToString.

1 Like

It also get error

can you build entire string in a variable and try
QueueItems.Where(Function (x) x.Reference.Equals(‘“+StringVariable+”’ ))

1 Like