Closed CasperJuulGregersen closed 1 year ago
I tried to reproduce but w&s not able to... Can you share the way you configured the control?
Hi MscrmTools,
Thanks for getting back to me regarding this issue.
I’ve added some screenshots from the configuration, my Tag table and the relationship between this and my Initiative table. The NN-control is inserted on a form in the Initiative table, and I have two records in the Tag table. Please let me know if you have any questions.
@.***
@.***
@.***
@.***
Kind Regards / Venlig hilsen,
Casper Lindy Gregersen | Senior Consultant @.*** | +45 2630 8988
www.projectum.comhttps://t-eu.xink.io/Tracking/Index/TSoAAFSrAAAV72MA0 | Follow us on LinkedInhttps://t-eu.xink.io/Tracking/Index/TioAAFSrAAAV72MA0 | Follow us on YouTubehttps://t-eu.xink.io/Tracking/Index/TyoAAFSrAAAV72MA0
From: MscrmTools @.> Sent: Monday, 5 December 2022 15.18 To: MscrmTools/PCF-Controls @.> Cc: Casper Lindy Gregersen @.>; Author @.> Subject: Re: [MscrmTools/PCF-Controls] NN Checkboxes: All checkboxes are checked on load (Issue #111)
Du får ikke ofte mails fra @.**@.>. Få mere at vide om, hvorfor dette er vigtigthttps://aka.ms/LearnAboutSenderIdentification
I tried to reproduce but w&s not able to... Can you share the way you configured the control?
— Reply to this email directly, view it on GitHubhttps://github.com/MscrmTools/PCF-Controls/issues/111#issuecomment-1337447942, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOB7ZIWLBUZECTXIRJJOP6TWLX2R5ANCNFSM6AAAAAASHVZF3Y. You are receiving this because you authored the thread.Message ID: @.**@.>>
I am seeing a similar issue. By default all of the checkboxes are checked. If I add a subgrid so I can see any related records I have noticed the following...
1) Even though the checkboxes default to selected, there are no records in the associated subgrid. 2) Unticking and ticking checkboxes doesn't add records to the related subgrid 3) Manually adding records to the subgrid and then unticking the checkboxes does cause them to be removed.
So Unticking is removing records but ticking isn't adding them and all checkboxes default to ticked regardless of whether there are related records or not.
All I have configured in the control is the name of the related table, the view and the label column. I have also tried manually specifying the relationship but this didn't make a difference.
Cheers
Alan
Would it be possible to get the configuration for the PCF? Also, are you using latest version?
Hi, yes it is the latest version. Can you be more specific about what configuration you want? As mentioned above, I have only configured the name of the related table, the view to use and the column to use for the label. Everything else is left blank. The control does correctly show the labels for the records in the related table. Happy to provide any additional info or set up a screen share if that would help.
A screenshot of the configuration just to be sure I see the whole picture.
It’s not a specific configuration, I want – not yet at least, I’m just investigating the PFC control, which looks really nice (besides this issue).
I just noticed that when the form loads, all options are always checked by default. In my test/example above, I have two records (Business and Family) in my list of tags, and only Business is related to the record in the project table, but both Business and Family are checked on form load.
Kind Regards / Venlig hilsen,
Casper Lindy Gregersen | Senior Consultant @.*** | +45 2630 8988
www.projectum.comhttps://t-eu.xink.io/Tracking/Index/TSoAAFSrAAAV72MA0 | Follow us on LinkedInhttps://t-eu.xink.io/Tracking/Index/TioAAFSrAAAV72MA0 | Follow us on YouTubehttps://t-eu.xink.io/Tracking/Index/TyoAAFSrAAAV72MA0
From: MscrmTools @.> Sent: Saturday, 17 December 2022 20.44 To: MscrmTools/PCF-Controls @.> Cc: Casper Lindy Gregersen @.>; Author @.> Subject: Re: [MscrmTools/PCF-Controls] NN Checkboxes: All checkboxes are checked on load (Issue #111)
Du får ikke ofte mails fra @.**@.>. Få mere at vide om, hvorfor dette er vigtigthttps://aka.ms/LearnAboutSenderIdentification
A screenshot of the configuration just to be sure I see the whole picture.
— Reply to this email directly, view it on GitHubhttps://github.com/MscrmTools/PCF-Controls/issues/111#issuecomment-1356422143, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOB7ZIVJCPPFQDDJKNRN3MDWNYJXFANCNFSM6AAAAAASHVZF3Y. You are receiving this because you authored the thread.Message ID: @.**@.>>
I've tried with an without specifying the relationship manually.
Thanks
Alan
Hi Alan,
“The control does correctly show the labels for the records in the related table.” Just to be clear, it’s not about the control not showing the labels correctly, it’s about all labels being checked when the form loads.
Kind Regards / Venlig hilsen,
Casper Lindy Gregersen
Yep that is correct. All labels show correctly but are checked.
Even though they show checked, they are not marked as related records though. Unchecking and checking them also doesn't add them as related records.
When you only have one relationship between both tables, there is no need to specify the relationship. I Don't know if this is the case for your implementation. But can you try not to specify anything in this parameter?
Yep saw this in the documentation and tried it with and without a relationship specified and the result is the same.
This is so weird because I really do not reproduce it... :(
In the code, the only location where it is ticking checkboxes is after having read the information sent by the platform about related records. I don't see at all how it could check all records...
Do I need to have any specific settings on the underlying subgrid? At the moment it looks like this...
I don't think so... Do you have any dev skills so that I can ask you to peform some debug in browser console?
Found it! Maybe... You did not tick "Show related records", so that it sends all records
I haven't played with PCF controls but have basic js skills if that helps. Happy to open up the console and check things for you.
Did you see my latest comment : Found it! Maybe... You did not tick "Show related records", so that it sends all records
I wondered about that but thought it was suppose to show all records (in order to show the ones not selected as well as the selected ones)? If I try and tick the "show selected records" option in the designer I get an error.
OK, removed/deleted the checkbox list control and checked the "show related records" field with just the standard subgrid showing. That allowed me to save the form. Then added the checkbox list control back and saved again. Now it is behaving a little differently.
When I open a form the records are no longer all selected :) Only the correct records are selected :) If I unselect a record, the record is correctly removed from a subgrid I have showing on the page :)
The only problem I have is that if I deselect a record and click save, the record is correctly removed from the additional standard subgrid I have showing, but on saving, the deselected record in the checkbox list get selected again.
Starting with 2 records selected (checkbox list view at the top, standard subgrid underneath)
Deselect the "Has the order..." option
Refresh the subgrid
So the subgrid is showing the correct data but the checkbox control has reselected the record.
p.s. hitting refresh updates the checkbox control so everything matches
This might be a caching issue... I will try to reproduce this one but I guess we can finally close this issue
Thanks for your help!
That approach do also work for me: Add the default subgrid with Show related records selected. Save the form and then change the control to the Checkbox List.
Thanks for looking into this - really helpful!
When loading the page, all checkboxes are checked.
I have a project table and a tag table. A N:N relation between these two table exists. The control works very well when I manually select or deselect a tag, but when the page is refreshed all tags are checked (however, the saved data are correct)