function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Holly Stephens 2Holly Stephens 2 

if a check box on a screen is true, another checkbox is marked true on the same screen

I need to mark a check box true when another check box is marked true on the same screen is a visual flow. is that possible? what would the formula be?
HARSHIL U PARIKHHARSHIL U PARIKH
I am trying to understand it correctly...
Do you want if the checkbox X is checked on record then another checkbox (Y) should be checked by it self on same record?
If yes then you can follow the steps below & you don't need Visual-workflow for it.

1) Create a formula field on record named Y and set retrun type as checkbox.
2) set formuls as: IF( X__c = TRUE, TRUE, FALSE)

I am assuming that you already have field X created.
Holly Stephens 2Holly Stephens 2
No, what I would like to have happen is if a choice on my visual flow screen is marked yes then a check box on the same screen is marked true. If the user selects No, then this same check box is false. Holly Stephens Holly Stephens, MBA Salesforce Administrator Western Governors University 4001 South 700 East, Suite 700 Salt Lake City, UT 84107 O: 385.428.5593 | M: 801.803.4129 holly.stephens@wgu.edu [logo] More about WGU in Fast Company, CNN, NPR, NBC Nightly News, Money, The Atlantic, TIME, etc. wgu.edu
DixitDixit
i'm not getting what you mean with "visual flow", maybe cause i use my SalesForce in another language, can you post a photo? 

if it is in the record, you can use a formula field where you can use the "IF(ISPICKVAL(customfield__c, 'No'), False, IF(ISPICKVAL(customfield__c, 'Yes'), True, IF(...))) (ASSUMING you may not require just "yes/no") 
more simple: IF(ISPICKVAL(customfield__c, 'Yes', True, False))

if it is in a visualforce, you can use a rerender for the outputpanel where the sencond checkbox is. 
DixitDixit
i made a mistake in my "simple" way of doing it, it should be like: IF(ISPICKVAL(customfield__c, 'Yes'), True, False)  //// enclose the "ispickval"
Holly Stephens 2Holly Stephens 2
I understand how to do this if I am on a record, but I am wondering if when I am using a flow, that the same concept of the formula field can be applied. I have attached an image that shows that is the radio button marked “Yes” is true, then the mentor change request is marked true. If the radio button “No” is true, then this check box is not checked. Holly Stephens Holly Stephens, MBA Salesforce Administrator Western Governors University 4001 South 700 East, Suite 700 Salt Lake City, UT 84107 O: 385.428.5593 | M: 801.803.4129 holly.stephens@wgu.edu [logo] More about WGU in Fast Company, CNN, NPR, NBC Nightly News, Money, The Atlantic, TIME, etc. wgu.edu
DixitDixit
I don't know if I would include those equals 2 values in the same screen (I mean, I think that's why we have workflow rules or formula fields), but i think you may found usefull this workbook:

https://resources.docs.salesforce.com/sfdc/pdf/workbook_flow.pdf
Alain CabonAlain Cabon
Hello, 

If you have used the flow designer like below for your visualflow screen, you can solve your problem with jQuey. 

You need some javasript code and an embedded flow into a visualforce page.

https://<your_domain>.visual.force.com/apex/myflowpage  should be called instead of  /flow/Testflow/30158000000IEbZAAW

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_flows_adding.htm

Below the visualforce page myflowpage which contains the flow Testflow:
<apex:page >
    <apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" />
    <flow:interview name="Testflow"/>  
    <script type="text/javascript">
    j$ = jQuery.noConflict();
    j$(document).ready(function() {
        j$("[type*=radio]").click(function() { 
            choice = j$(this).val();
            if (choice == 'choice1') {
                j$("[name$=input____Checkbox_1]").prop('checked', true);
                j$("[name$=input____Checkbox_2]").prop('checked', false);
            }
            if (choice == 'choice2') {
                j$("[name$=input____Checkbox_1]").prop('checked', false);
                j$("[name$=input____Checkbox_2]").prop('checked', true); 
            }
        });
    });    
    </script>
</apex:page>

User-added image
User-added image

User-added image
User-added image

User-added image

Best regards

Alain