Discussions

 View Only
Expand all | Collapse all

Help with Dynamic form rules on show/hide fields

  • 1.  Help with Dynamic form rules on show/hide fields

    Posted 07-02-2019 15:06
    I have 20 date fields, 20 result fields and 10 activity fields. 
    There are 2 tables Course and Enrollment
    Activity field reside in Course table and Date and result fields in Enrollment. 

    I course has many enrollments. Also there is a field 'Number of activities' (multiple choice text with option 1 to 10) in Course table. Each course can have up to 10 activities. When a course is selected in enrollment table , the activity fields should appear in according to the number of activities listed for that course. For example:

    Course 1 has 3 activities, then in Enrollment table when course 1 is selected, Activity 1, activity 2 and activity 3 fields should be displayed. I have created 10 dynamic rules as follows: 

    When 'number of activities' >=1 show activity 1
    When 'number of activities'>=2 show activity 2. 

    Problem faced:  When number  of activities = 10 it displays only activity 1 and activity 10. Is there anything wrong with field type or rules? 


  • 2.  RE: Help with Dynamic form rules on show/hide fields

    Posted 07-02-2019 15:22

    Because [Number of Activities] is a text field, your formula compares the values like it compares text... i.e., in alphabetical order, not numerical order.  Consequently, "1" < "10" < "2" < "3", etc.  You might try creating a new formula-numeric field [Number of Activities - numeric] with the formula

    ToNumber([Number of Activities])

    and set your dynamic formula rules to use it instead of the [Number of Activities] (text) field.



  • 3.  RE: Help with Dynamic form rules on show/hide fields

    Posted 07-02-2019 15:29
    Hello, I tried using a fIt still shows activity 1 and activity 10 when number of activities is 10. Doesn't display activity 2 to 9. 


  • 4.  RE: Help with Dynamic form rules on show/hide fields

    Posted 07-02-2019 15:47
    Are you certain you adjusted all of the dynamic form rules to use the new field?  Please show me the formula you used for the new field.


  • 5.  RE: Help with Dynamic form rules on show/hide fields

    Posted 07-02-2019 15:55
    ">https://d2r1vs3d9006ap.cloudfront.net/s3_images/1795707/RackMultipart20190702-62665-u184sn-community_inline.PNG?1562082931">


  • 6.  RE: Help with Dynamic form rules on show/hide fields

    Posted 07-02-2019 15:55
    No of activities is a formula numeric field


  • 7.  RE: Help with Dynamic form rules on show/hide fields

    Posted 07-02-2019 16:00
    Please show me the formula you used for [No of Activities], and also a screenshot of one of the form rules that isn't working... like the one for [Course - No of Activities] >= 3.


  • 8.  RE: Help with Dynamic form rules on show/hide fields

    Posted 07-02-2019 19:18


  • 9.  RE: Help with Dynamic form rules on show/hide fields

    Posted 07-02-2019 19:18
    This is the formula I used to convert. It is a formula numeric type. 


  • 10.  RE: Help with Dynamic form rules on show/hide fields

    Posted 07-02-2019 19:19
    also the dynamic formula mentioned above is the one which is not working


  • 11.  RE: Help with Dynamic form rules on show/hide fields

    Posted 07-02-2019 20:28
    Do your other rules work?  Do they look like these?

    ">https://d2r1vs3d9006ap.cloudfront.net/s3_images/1795740/RackMultipart20190702-23358-gphmkx-rules_inline.png?1562099104">

    Set up this way, when I have a Course where [Course - Number of Activities] = 4, I see this:



  • 12.  RE: Help with Dynamic form rules on show/hide fields

    Posted 07-02-2019 20:31
    Notice that each field appears in only one rule.  If a field is affected by more than one rule, then the latter rule will "overrule" the earlier one(s).


  • 13.  RE: Help with Dynamic form rules on show/hide fields

    Posted 07-03-2019 14:16
    Changing all rules did the job. Thanks


  • 14.  RE: Help with Dynamic form rules on show/hide fields

    Posted 07-03-2019 14:49
    Glad to help!