Configuring Write Access Driver by Drop-down

z77v303
New Contributor

Configuring Write Access Driver by Drop-down

Hello,

 

I am trying to configure the write access driver of an item to build something as follows:

If drop-down item is selected, then the write access to a column is revoked. Else, you have write access.

 

Can a write-access driver be configured to dynamically change once a drop-down item is selected? All the examples that I have seen have only have used booleans. 

1 ACCEPTED SOLUTION

Accepted Solutions
anand.shekhawat
Valued Contributor

@z77v303  

 

Here you can write the conditions in both Read/Write access driver booleans. It would look something like below

 

IF  'INP00 - Checklist'.Type = A THEN TRUE ELSE IF  'INP00 - Checklist'.Type = B Then False ELSE IF  'INP00 - Checklist'.Type = C THEN FALSE ELSE FALSE 

 

The above read/write access drivers will then drive your module/line item accordingly. 

 

~Anand

 

 

View solution in original post

9 REPLIES 9
anand.shekhawat
Valued Contributor

@z77v303 

 

You can only set a boolean formatted line item as a Read/Write access driver for a line item (or for the module). Here what you could do is make the Read/Write access driver line items dynamic. To do this apply a suitable conditional formula on the access driver booleans to make it dynamic as per your selections in the drop down.

 

~Anand

z77v303
New Contributor

@anand.shekhawat 

 

Regarding your point - let's say we have a drop-down column called TYPE consisting of:

  • A
  • B
  • C

Why can't I just make a formula that looks like this?

TRUE IF 'INP00 - Checklist'.Type = A ELSE FALSE

what would be the correct way to write this?

anand.shekhawat
Valued Contributor

@z77v303  

 

Here you can write the conditions in both Read/Write access driver booleans. It would look something like below

 

IF  'INP00 - Checklist'.Type = A THEN TRUE ELSE IF  'INP00 - Checklist'.Type = B Then False ELSE IF  'INP00 - Checklist'.Type = C THEN FALSE ELSE FALSE 

 

The above read/write access drivers will then drive your module/line item accordingly. 

 

~Anand

 

 

rob_marshall
Moderator

@anand.shekhawat 

 

I would not do it this way as it is a) hardcoding, b) not scalable for the future, and c) it will not perform well as this lengthy IF THEN ELSE statement is sequential.  Try using lookups to SYS modules instead and/or review this document https://community.anaplan.com/t5/Best-Practices/Decreasing-the-Length-of-Your-Formulas/ta-p/88467.

 

Now, using LISS as I did in the document, that only works with numbers, but that can be worked around by using booleans and 1 and 0's. 

anand.shekhawat
Valued Contributor

@rob_marshall 

 

After posting the comment, I also felt the same Rob. Thank you for the advice.

Lot to learn

 

Regards,

Anand

rob_marshall
Moderator

@anand.shekhawat 

 

All good, that is what this community is for, to learn!

 

Rob

z77v303
New Contributor

@anand.shekhawat @rob_marshall First of all, thank you for the assistance 🙂

 

I should note that the thing it is checking for is text. So if I do this
IF 'INP00 - Checklist'.Type = "A" THEN TRUE ELSE FALSE

I get this error:

Datatypes do not match for '=' function: LIST:Resource Type, TEXT
 
If I remove the quotation marks:
A is not a recognized line item or list member
 
 
rob_marshall
Moderator

@z77v303 

 

Let's start over or from the top.

 

What is the column you are wanting to have read only or write?  Is it a line item or list member?  

 

do you have a screenshot of what you are attempting to do?

 

Rob

z77v303
New Contributor

Sorry - this was a separate issue the dealt with the intricacies of my model. As for the question posed originally, your solution is correct.