cms_user custom field macros

Sonia Samimi asked on September 4, 2016 09:46

Hi guys I have a problem with macros in where part of a query repeater web parts. I have a custom filed in CMS_User system table called "BusinessUnitId " I want to make a where condition by comparing CurrentUser.BusinessUnitId and a field of another table which I called it "ReagentGUID" of "c" table the macro that i have used is {%CurrentUser.BusinessUnitId#%} = c.ReagentGUID but it see the following error:

Server Error in '/' Application. An expression of non-boolean type specified in a context where a condition is expected, near 'c43'.

Correct Answer

Kristian Bortnik answered on September 4, 2016 10:17

Is the BusinessUnitId field a Guid field?

If so, you need to wrap your macro in quotes. The query repeater WHERE condition would then be:

'{%CurrentUser.BusinessUnitId|(identity)GlobalAdministrator%}' = c.ReagentGUID
0 votesVote for this answer Unmark Correct answer

Recent Answers

Sonia Samimi answered on September 4, 2016 11:03

yes it is . thank you very much. my problem is fixed . :D LIKE

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.