Trying to make Radial button to act as boolean check box

sarabi98sarabi98 Member Posts: 13
I have a tabular type form with a field to Import Documents. The pushAction property for this is set to RunObject - which runs the Form Documents.

I have a request to change the check box option on those to look like a radial button. Is this possible?
I added a radial button to the form. But I realised that I need to add 2 columns, one that is yes and one that is no. So now I have 2 Columns
No Documents Imported and Import Document.
I am trying to set it so that when the user click on Import Document radial button the pushaction property is triggered.
I have kind of managed this with C/AL code. However, the problem is that when the user clicks on a Radial Button for Import Document all the records get checked. How can I avoid that?
Thanks for any help

NP

Comments

  • ClausHamannClausHamann Member Posts: 80
    I am not 100% sure about what it is you are trying to do but this is how I see it.

    Yes, you can use a radial button (option button) instead of a checkbox. Just remember to set OptionValue = Yes for one of the buttons and OptionValue = No for the other button.

    I can't understand why all records gets checked if you check one record unless you are using a variable as SourceExpr. Are you using a variable as SourceExpr or a field from a table?

    Regards

    Claus
  • sarabi98sarabi98 Member Posts: 13
    Yes I have set the SourceExpr to go to the Documents table. The field I am calling is View Document which I created in the table.
  • kinekine Member Posts: 12,562
    It seems like error in your C/AL code... :-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • David_CoxDavid_Cox Member Posts: 509
    Stick to your table field as a Boolean and a Check Box on the form and add code to the OnValidate or OnAfterValidate Trigger of the Checkbox Control to run the report.

    IF (MyFlag <> xrec.MyFlag) AND (Myflag = TRUE)THEN
    MyReport.RUN;

    Or if you keep 2 the option Buttons code on form control
    IF (MyFlag <> xrec.MyFlag) AND (Myflag = MyFlag::PrintRecord)THEN
    MyReport.RUN;


    The only way I can see that all records get checked is if the field is a flowfilter or a variable and not a table field, or it's your code.
    Analyst Developer with over 17 years Navision, Contract Status - Busy
    Mobile: +44(0)7854 842801
    Email: david.cox@adeptris.com
    Twitter: https://twitter.com/Adeptris
    Website: http://www.adeptris.com
Sign In or Register to comment.