Method Community

 

How do I limit access to a selection in a dropdown?

Last post 09-05-2012 8:56 AM by Anonymous. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 09-04-2012 9:46 AM

    How do I limit access to a selection in a dropdown?

    I would like for only one employee to have access to the drop down selection closed job in the edit customer screen, which is in the field Job Status. The job status field has various drop down selections such as awarded, in progress, pending, closed job etc. I just want the closed job selection to be available to only one specific user name and I do not want any other users to have access selecting the closed job dropdown, but I still want the others to have access to the remaining drop downs in this job status field. Any advice how this can be done?

  • 09-05-2012 8:56 AM In reply to

    Re: How do I limit access to a selection in a dropdown?

    Answer

    dottie:
    Any advice how this can be done?

    Yes, the best way to do this would be to build a set of actions for the Text Change event on the Job Status drop down. I think you're familiar with copying a screen so I'll skip that step here. With a copy of the CRM_EditCustomer screen you want to look for the Payment & Job Info section, click edit on the Job Status drop down and jump to step 2 of 6. You'll notice the event here is Text Change - this means that whenever the text on this drop down changes, execute this set of actions. Here are the actions you'll want to add:

    1. Add a Retrieve Value From Table with the following options:
    • From Table: Customer, from field: JobStatus
    • Where field: RecordID, is Value From Session: Current- Screen Active RecordID
    • Place value in: Action Result, call it jobStatusFromTable

    1. Add a Start Conditional Statement with the following options:
    • Value 1: Value From Screen: Job Status is Equal to: Type In: Closed.

    1. Add a Start Conditional Statement with the following options:
    • Value 1: Value From Session: User- Is Method Admin? Equal to: Type In: True

    1. Add a Enter Value Into Field On Screen with the following options:
    • Update Field or Object: JobStatus
    • Dropdown Attribute: Text
    • With the Value: Action Result: jobStatusFromTable

    1. Then add 2 End Conditional Statements to close off action set.


    To explain things a little more, the first action is getting the current JobStatus from the table and storing that in an Action Result to be used later. The next action is a conditional statement checking to see if the dropdown for JobStatus was changed to Closed. If this is true then my next conditional statement checked to see if the user is a Method Admin. If the user isn't a Method Admin then I use an Enter Value Into Field On Screen to switch the job status back to what it was.

    I make the assumption above that only the Method Admin user is allowed to close a job - if this isn't the case then you'll need to adjust the actions for step 3 accordingly.

    HTH,

    ~C

Page 1 of 1 (2 items)