Need to create sysfilter for schema where attribute type is boolean | Community
Skip to main content
Level 4
January 8, 2025
Solved

Need to create sysfilter for schema where attribute type is boolean

  • January 8, 2025
  • 1 reply
  • 539 views

Hi All,

 

I need to create sysfilter for schema where attribute type is boolean,

 

Attribute

<attribute advanced="true"  label="Flag" name="iFlag"
notNull="true" sqlDefault="0" sqlname="iFlag" type="boolean"/>

 

Now I need add condition for sysfilter in same schema if this FLAG VALUE IS TRUE THEN it should not be visible to non admin users,

 

please help me with this syntax, I tried multiple combination but none of them is working, please help me here

@parthasarathy 

@_manoj_kumar_ 

Best answer by ParthaSarathy

Hi @shruti1 ,

With the below sysFilter script, Admin user can see all the data whereas non-Admin users can see only the data where @iFlag value is No

<element autopk="true" label="schema" name="schema"> <sysFilter name="readAccess"> <condition enabledIf="hasNamedRight('admin')=false" expr="@iFlag=0"/> </sysFilter> <attribute label="text1" name="text1" type="string"/> <attribute label="text2" name="text2" type="string"/> <attribute advanced="true" label="Flag" name="iFlag" notNull="true" sqlDefault="0" sqlname="iFlag" type="boolean"/> </element>

 

1 reply

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
January 9, 2025

Hi @shruti1 ,

With the below sysFilter script, Admin user can see all the data whereas non-Admin users can see only the data where @iFlag value is No

<element autopk="true" label="schema" name="schema"> <sysFilter name="readAccess"> <condition enabledIf="hasNamedRight('admin')=false" expr="@iFlag=0"/> </sysFilter> <attribute label="text1" name="text1" type="string"/> <attribute label="text2" name="text2" type="string"/> <attribute advanced="true" label="Flag" name="iFlag" notNull="true" sqlDefault="0" sqlname="iFlag" type="boolean"/> </element>

 

~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups