Limit enumeration values available for an operator

Avatar

Avatar
Validate 25
Level 4
salvdangelo
Level 4

Likes

45 likes

Total Posts

130 posts

Correct reply

4 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile

Avatar
Validate 25
Level 4
salvdangelo
Level 4

Likes

45 likes

Total Posts

130 posts

Correct reply

4 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile
salvdangelo
Level 4

15-04-2019

Hello,

I was wondering how is it possible to limit the visibility of the enumeration values in an enumeration E according to one condition specified in an input form (for example current operator group, or one named right the operator owns)

Example:
ENUM E: A,B,C,D

OPERATOR GROUP "OpA" --> Field myValue using ENUM E : dropdown list will show values A,B,C

OPERATOR GROUP "OpB" --> Field myValue using ENUM E : dropdown list will show values B,D

...

Could you tell me how is it possible to do that inside an input form ?

Thanks in advance,
Salvatore

Jean-Serge Biron

wodnicki

pablo.rosero

Amit_Kumar

davidk23955130

Amy_Wong

Adobe Campaign Classic

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 5
Level 3
geoffreyl240454
Level 3

Likes

27 likes

Total Posts

47 posts

Correct reply

6 solutions
Top badges earned
Boost 5
Boost 3
Boost 25
Boost 10
Boost 1
View profile

Avatar
Boost 5
Level 3
geoffreyl240454
Level 3

Likes

27 likes

Total Posts

47 posts

Correct reply

6 solutions
Top badges earned
Boost 5
Boost 3
Boost 25
Boost 10
Boost 1
View profile
geoffreyl240454
Level 3

15-04-2019

Hi salvdangelo​,

It's possible to do that with this steps:

- Creation of a relation table between the Operators and the Enumeration Values tables (N-N), this table will contains the operatorId and the enumValueId (same principle than between the recipients and the recipients lists).

- Linking the Operators and the Enumeration Values tables with the new relation table.

- Adding a "sysFilter" in the input defined in the input form:

<sysFilter>

     <condition expr="[enumValueOperatorRel/@operator-id] = $(@operator-id)"/>

</sysFilter>

Best Regards.

Geoffrey.

Answers (7)

Answers (7)

Avatar

Avatar
Boost 5
Level 3
geoffreyl240454
Level 3

Likes

27 likes

Total Posts

47 posts

Correct reply

6 solutions
Top badges earned
Boost 5
Boost 3
Boost 25
Boost 10
Boost 1
View profile

Avatar
Boost 5
Level 3
geoffreyl240454
Level 3

Likes

27 likes

Total Posts

47 posts

Correct reply

6 solutions
Top badges earned
Boost 5
Boost 3
Boost 25
Boost 10
Boost 1
View profile
geoffreyl240454
Level 3

06-08-2019

Hi salvdangelo​, yashdeepm7845047​, arpandas681683​,

I found a way to filtering very easily the values of an enumeration coming from a schema. In fact, you have just to add a "enabledIf" attribute with a "HasNamedRight('myRightName')":

<enumeration basetype="string" default="A" name="example">

     <value enabledIf="HasNamedRight('OpA')" label="A" name="A" value="A"/>

     <value enabledIf="HasNamedRight('OpA') or HasNamedRight('OpB')" label="B" name="B" value="B"/>

     <value enabledIf="HasNamedRight('OpA')" label="C" name="C" value="C"/>

     <value enabledIf="HasNamedRight('OpB')" label="D" name="D" value="D"/>

</enumeration>

The named right can be applied on an operator or a group.

Please note that an administrator can see all the values even if he haven't the good right.

Regards,

Geoffrey.

Avatar

Avatar
Level 1
arpandas681683
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile

Avatar
Level 1
arpandas681683
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile
arpandas681683
Level 1

08-07-2019

Sorry i didnt get it

can someone explain this solution in more details

thank you

Avatar

Avatar
Establish
MVP
wodnicki
MVP

Likes

977 likes

Total Posts

1,096 posts

Correct reply

516 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile

Avatar
Establish
MVP
wodnicki
MVP

Likes

977 likes

Total Posts

1,096 posts

Correct reply

516 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile
wodnicki
MVP

07-05-2019

Hi,

You can do this with schema sysfilters and joins. Sysfilter you're conditionally appending predicates to the where clause, usually current operator has a right or is admin. I'm not sure how dbEnums behave with schema sysfilters tacked on (to xtk:enum), but sounds like something that should work.

Thanks,

-Jon

Avatar

Avatar
Boost 5
Level 3
geoffreyl240454
Level 3

Likes

27 likes

Total Posts

47 posts

Correct reply

6 solutions
Top badges earned
Boost 5
Boost 3
Boost 25
Boost 10
Boost 1
View profile

Avatar
Boost 5
Level 3
geoffreyl240454
Level 3

Likes

27 likes

Total Posts

47 posts

Correct reply

6 solutions
Top badges earned
Boost 5
Boost 3
Boost 25
Boost 10
Boost 1
View profile
geoffreyl240454
Level 3

07-05-2019

Hi yashdeepm7845047​,

The principle works with the enumeration values but I unfortunately did not found a way to apply this to the enumerations from schemas.

It is possible to create two enumerations in the schema and call the good one in the form depending on the operator but this solution means that we have two different fields in the database and I think it's not really clean.

Thanks,

Geoffrey.

Avatar

Avatar
Validate 1
Level 1
yashdeepm784504
Level 1

Likes

2 likes

Total Posts

7 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
yashdeepm784504
Level 1

Likes

2 likes

Total Posts

7 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
yashdeepm784504
Level 1

06-05-2019

Hi geoffreyl24045476​ and salvdangelo

Can we do same configuration at Schema level ?

ENUM Frequency : dropdown list will show values Daily, Weekly, Monthly for operator 1

ENUM Frequency : dropdown list will show values Daily, Weekly for operator 2

Thanks,

Yashdeep

Avatar

Avatar
Boost 5
Level 3
geoffreyl240454
Level 3

Likes

27 likes

Total Posts

47 posts

Correct reply

6 solutions
Top badges earned
Boost 5
Boost 3
Boost 25
Boost 10
Boost 1
View profile

Avatar
Boost 5
Level 3
geoffreyl240454
Level 3

Likes

27 likes

Total Posts

47 posts

Correct reply

6 solutions
Top badges earned
Boost 5
Boost 3
Boost 25
Boost 10
Boost 1
View profile
geoffreyl240454
Level 3

19-04-2019

Hello Abdul,

It's more complicated to do that with the groups.

Indeed, an operator can be linked to many groups so it's difficult to set the "sysFilter" tag.

If it's possible, I don't know how. Sorry to can't help more.

Best Regards,

Geoffrey.

Avatar

Avatar
Boost 5
Level 4
AbdulZa
Level 4

Likes

43 likes

Total Posts

50 posts

Correct reply

8 solutions
Top badges earned
Boost 5
Boost 3
Boost 25
Boost 10
Boost 1
View profile

Avatar
Boost 5
Level 4
AbdulZa
Level 4

Likes

43 likes

Total Posts

50 posts

Correct reply

8 solutions
Top badges earned
Boost 5
Boost 3
Boost 25
Boost 10
Boost 1
View profile
AbdulZa
Level 4

18-04-2019

Can this be done on an operator group level? the goal here not to update the relationship table every time a new operator/user is being created/added to the system.