I am trying to make a label with information needed visible/invisible depending on the boolean value of a UD field I created. The form has access to the value which I checked by putting a checkbox tied to it on the screen as a test.
Any help is appreciated. I can supply more information if this seems vague.
I am doing it on the Service Call Center screen, Lines Tab. They want a box to appear if a box is checked on the Customer form and be hidden if the box is not checked.
Yes, trying to do the info with just a label instead of a textbox.
Not sure which wizard to use. Don’t do too much with them right now, lol.
The checkbox does not show on this screen. Do I create one and set to hidden to trigger it?
I would recommend clicking through all of the things in the wizard that you can do. There is a lot of stuff that will make you a lot faster at this stuff instead of trying to write it from scratch.
And no, your check box should need to be on the screen, you should be able to see it in the dataview whether it’s bound to a control or not.
If you go to tools->obsject explorer, you can look through all of the dataviews that are loaded up in the customization. Your FKV should show up in there, and you should see how you can get to those properties.
It compiles fine but does not work. I now also get an error when I open Service Call Center.
OnCustomCodeFormLoad Exception has been thrown by the target of an invocation
Any ideas where I strayed? I don’t know C# much at all.
Hmmm… didn’t know that
I’ve always used a Native Reference (GUID) … just because I learned that a long time ago.
e.g.
EpiLabel myLabel = (EpiLabel)csm.GetNativeControlReference(“xxxxx-xxxxx-xxxxx-xxxxx-xxxxxx”);
mylabel.Visible = false;
To be clear, I still use that for native controls, mostly because their names end up being super confusing, but in essence I think it’s mostly a way to just rename it in your code. Maybe someone has a better reason as to why you need to do this?
edit: I would have to test to be sure, but I don’t know if you can use the name on native controls. But it works fine for custom controls.