Skip to main content

myEvolv Tips: Subform Field Manipulation

Credit for figuring these out/discovering them goes to Perry. I find myself referring to them in a training binder I got from last year’s NY Training Summit and figured it would be easier to just get them up on the web so I don’t have to go hunting for that binder every time. The following code works for Classic.

Subform Considerations

Subforms have to be handled differently than forms when it comes to JavaScript because while in the form designer, the two things look identical, the way that myEvolv renders a subform in the browser is very different from how it renders a form. But it isn’t radically different and the main changes account for the fact that a subform can have one or more rows and so you need to be more specific about which field you are trying to manipulate so that you don’t change every line simultaneously.

Scenario 1: Get the Value of a Subform Field

This code is for use within the subform, e.g. if you want to default the value of one field based on the value of another on the same subform.

self.getElementFromXML(currentRowXML, 'column_name');

Note the self object is being used here. This is the subform object as distinguished from the parent form object. The parameter currentRowXML then further narrows it down to the current record/row on the subform that you are concerned with.

Scenario 2: Set the Value of a Subform Field

Again, for use within a subform, this code can be used to set the value of a field in the same subform, e.g. when you want the On Change event to auto-populate a field.

this.form.'column_name'.value;

If you are checking a checkbox, use this code:

this.form.'column_name'.checked = true;

Note that in this code, you do keep the single quotes in the code for it to work properly. All you change is the column_name

Scenario 3: Get the Value of a Parent Form Field

With this code, you can get the value of a field in the parent form based on an action in the subform.

window.parent.getFormElement('column_name');

Note the window.parent is the only difference from the code you would use on the parent form. This is what allows your code to ‘jump up out of the subform’.

Scenario 4: Set the Value of a Parent Form Field

Maybe you figured it out by now but you can use the same small change to set values on the parent form from the subform.

window.parent.setFormElement('column_name', value);

Scenario 5: Trigger an Alert from the Subform

Alerts are useful in guiding user activity and you can trigger them from subforms. Similar to the last two, the trick is moving back up the DOM to the parent form to trigger it.

window.parent.window.alert('Alert Message');

Other Possibilities

It is possible to go the other way and get and set values on subform records from the parent form, however, it becomes a much more complex problem that requires very specific solutions for very specific challenges. That is because of the One-to-Many relationship that the subforms have with the parent form. For these types of situations, you will probably be targeting the subform itself and then looping through each record to get or set values.

myEvolv Tips: Third Party Software Installation Files

myEvolv uses some third-party plugins for things like scanning and printing. The installer for these are supposed to execute automatically for users when they reach a point where they need them. For example, the MeadCo’s ScriptX plugin installer will launch for users who try to print on a machine that does not have the plugin installed.

These installers are available to be downloaded on demand so that they can be pushed out with group policy or pre-installed on machine images. On the old forums site, I had found a listing of the location of each of the installers and grabbed a snapshot of it before it closed down. Recently our own IT people were wondering about how to get one of the plugins and it reminded me that I had the snapshot somewhere and also that I should post it here since it is something I’m sure others have needed.

The table below will lists the program and it’s location. The location is relative to your agency’s myEvolv login page. For example, if your agency’s myEvolv login page is https://myevolvagency.netsmartcloud.com and the location for the file you want is imageX.msi, then you will go to https://myevolvagency.netsmartcloud.com/imageX.msi

Third Party Software Installation Files

File Location Note
Spell Checker Wspell.cab Demo remarks field at /remarks.html ?
Printer Smsx.exe MeadCo ScriptX
Check Print Cp_setup.exe
Front Desk FrontDeskSetup.msi
Image Scanning imageX.msi No longer there?
Custom Report Designer RDSetup.msi
WebCam VideoCapX.msi This must be for direct capturing photos on photo link fields.

myEvolv Tips: Developer Tools in Modals

There are times when it is useful to analyze the Document Object Model of your myEvolv form, especially when you are trying to figure out ways of manipulating the form with JavaScript. If you are on a main screen in myEvolv, you can simply press the F12 key on your keyboard to bring up Internet Explorer’s developer tools. However, this does not work when you press it while focused on a modal pop-up in myEvolv.

In order to get the developer tools to work so that you can see the DOM for your event forms, follow the steps below.

1) Disable Setting that Allows Websites to Suppress Address Bar

Open Internet Explorer’s Internet Options and click on the “Security” tab. Make sure “Trusted Sites” is highlighted and click the “Custom level…” button.

In the Security Settings dialog, scroll down to the Miscellaneous settings. Select “Disable” for the setting “Allow websites to open windows without address or status bars”. Apply the settings and close the Internet Options dialog.

This setting will cause the modal popups that myEvolv uses to display event forms to display their url, which is required for developer tools to be used on a window.

2) Open Developer Tools and Un-Pin it From the Browser Window

At this point, some of you may be able to simply open an event form in myEvolv and press F12 and the developer tools open without problem. For others, nothing happens when F12 is pressed in a modal or you get a warning that says the main windows developer tools will need to close so that i can open a new one in the modal but then nothing happens.. The rest of the steps in this post will show the workaround for that.

The first thing you will need to do is un-pin the developer tools from the browser window so that they open in their own separate window. Close any modals you have open and press F12 so that the developer tools open in the browser. In the upper right hand corner of the development tools pane, there is an un-pin button you can click. The develop tools will then open in their own separate window.

3) Open The Event and Select the Right Form in the Debugger

With the Developer tools in their own window, you can open the event that you want to analyze with developer tools and still have access to the developer tools window. When you open the event, it will not automatically populate in the developer tools. You must select it in the “Debugger” tab.

Click the Debugger tab and note that the pane below the toolbar support multiple tabs. You will probably see main.aspx loaded in the pain and that represents the main screen of myEvolv. At the bottom of that pane is a debugger pane. Find an error or warning related to eventform.asp. It should be shown as a link and clicking that link will load the event_form DOM in the debugging pain next to main.aspx.

UPDATE: Easier Way

Instead of going through the last steps 2 & 3 above, you can just copy and paste the url for the modal into a new tab in Internet Explorer and then launch developer tools for that tab.

Tips and Tricks: Two Methods for Finding a GUID

In a previous post I used Crystal Reports to find the GUID associated with a program in my tables. Since Crystal Reports is not an option for everyone, I thought I would share two methods that everyone has for discovering the GUID of a picklist item in myEvolv.

Method 1: Form Field Manipulation

If you are trying to determine the GUID value for a picklist field, you can make a quick change in the for designer to expose the GUID.

In this example, I am going to try to figure out the GUID for my Preschool – Classroom program. On the form below, I have the program_providing_service field which uses the “Program Listing – All” lookup table. I have selected ‘Preschool – Classroom’ on the form and will save the form with this value.

program providing service field as foreign key

Next step is to go to the form designer and edit this form. The program_providing_service field on the form is a Foreign Key field and it is associated with a lookup table. This accounts for how it displays on the form as a picklist field where instead of seeing the GUID of the program providing service, you see its description value from the lookup table.

program providing service field properties

If we change the Display Type Code of the field to Regular String and clear the value for the lookup table, the Program field will display on the form as a text field and expect the user to type in a GUID. However, on forms where the value already has been entered and saved, the value will display as the GUID of the item selected. So we will change the Display Type Code to Regular String and then Save the form.

Upon re-opening the saved event from before, we see the GUID of ‘Preschool – Classroom’ program displayed in the Program column. Once you have your GUID, you can revert the changes made to the form.

program providing service displayed as guid

Method 2: Data Insight Report

This method requires a little knowledge about the tables in myEvolv but works when you can’t edit the form to use method 1.

Navigate to Reports >Data Insight Report Writer >Custom Reporting >Custom Reporting

Click Configuration then Click “Create a new virtual view”

Give your virtual view a name and friendly name and then use a simple SQL statement to get everything from the table that contains GUID. In my example, I am looking for everything from the program_info table because that is where all of the programs are kept. user_defined_lut contains all of the user defined lookup table values combined together.

So I will use SELECT * FROM program_info

virtual view

Save the view and then click “Report Management” and click “Add”. Select “Tabular Report With Header”

Select your virtual view as the data source and click “OK”.

In the Report designer, add the Primary Key Column (in this case program_info_id) – it is usually the one with the same name as the table and then _id at the end.
Also add the description column – in some cases this column might have a different name – for my example, the column I want is program_name.

At the bottom of the screen, you will see a preview of your report with the GUID and the Description so that you can tell which GUID belongs to which item.

report results

Tips & Tricks: Use Images in Memo Fields

The following post outlines how to use images in memo fields as was shown in my presentation at CONNECTIONS2016.

memo-field-after-save

Memo fields in myEvolv are unique because they are rich text fields. This means that they will retain any markup that is done to them so that you can do things like change the font size and underline text that is being input into the field. When you are changing the formatting of the fields, HTML markup is being applied to the text behind the scenes. Because of this fact, we can use other HTML tags in a Memo field and have the browser render them just like it renders the rest of the webpage. One place where this can be useful is in adding images to treatment plans for individuals with intellectual and developmental disabilities.

With the Memo fields, you can just enter the HTML markup in the field itself and after saving, you will see the result. The challenge is therefore not in manipulating myEvolv to allow HTML but rather figuring out a way for clinicians who are not web developers to use pictures in their treatment plans.

Form Setup

There isn’t a lot to setting up the form but you have to keep this in mind: When you setup a text template, you must designate the table and columns for which the template will be available. In my agency’s case, the treatment plan had three fields where we wanted to use images: Likes/Interests, Dislikes/Fears, and Strengths/Skills. Each of these has it’s own user defined Memo field so that other programs using the progress_note field would not have the option of choosing one of my image text templates. It was also important to separate them so that someone didn’t accidentally put an image from the wrong category into the wrong field.

Note: If you setup a new Memo field before you setup the text templates for it, the template button on the Memo field may be disabled. You can fix that by making a change to the form so that it rebuilds the Form XML or run the Create Forms XML utility to awaken the button once a text template is linked to the field.

Preparing the Markup

The first step is to find the image that you want to use. The image needs to be on a web server somewhere because you are going to link to it rather than upload it. Ideally, your agency would set one up so that you could be sure the images that you use won’t ever disappear from the internet, leaving your old plans with broken image links. If that is not an option, you can use images from anywhere on the web. You will need the URL for the image itself. You can get that by finding an image on a website, right clicking it and selecting “Open Image in New Tab” or a similar option, depending on browser. Then you simply put the url into an img tag:

<img src='http://blog.corbinet.com/wp-content/uploads/2016/10/bunny.jpeg' />

bunny

The image tag that I created above will render an image is that is 543 pixels wide… too big for my plan, so I need to add some CSS styling to the image tag to make it smaller. Again, if you are hosting your own images, you could just make the raw image the size that you want and avoid this step. Another thing that I wanted to do is have the pictures site next to one another if I put multiple in a row so I am going to have the images styled to display inline.

<img src='http://blog.corbinet.com/wp-content/uploads/2016/10/bunny.jpeg' style='width: 150px; display: inline' />

bunny

You can add other styling as you see fit using inline CSS.

Setting up the Text Template

text-template-setup

Give your text template a descriptive name since this is all the clinician will see in the list of templates when they must choose.

At the bottom, link your template to the correct table and column that you setup on your form.

For the template text, you will enter the img tag that you created. Note: I have found that you cannot type this img tag into the field because it will begin to add markup to the url that you are using for the src and that breaks the image. Instead you must paste the img into the Template Text field and save without making any changes.

If you have entered syntactically correct HTML, after saving, you should see the image and not the text:

text-template-saved

If you see this, then you need to start again:

text-template-broken-image

When you revisit the Text Templates area in the future, you may or may not seethe image rendered in the list of text templates but you should when you open a text template for editing or viewing.

Applying Text Template in Memo Field

When the clinician goes to add the image to the Memo field, they can select the text template that contains the image. Unfortunately, when they select the text template, they will see the markup that will render the image once the form has been saved and not the image.

memo-field-before-save

After saving, the image should appear. You can also add text in the same field to label the pictures or explain them.

memo-field-with-captions

Tips & Tricks: Remove Unwanted Service Related Encounter Information from Services

I was recently working on configuring an event in myEvolv that required making a custom form in the People Placement and Treatment History form family.  Once I got the form looking right, I set about configuring the event.  I needed this event to be a service so that I could take advantage of the electronic signature functionality so I checked the “Is Service Event” checkbox for the event.

event-config

 

When I added a new service entry to test after saving this configuration, there was now Service Related Encounter Information appended to my form.

service-encounter-info

 

This was a problem since many of these fields were not applicable to the event that I was setting up and I did not want the clinicians to mess with them if they did not need them.  I looked back at the form designer to find out if I could hide them like other fields but they did not show up in the form designer.

form-designer-before

 

Fortunately, there is a way to get around this.  myEvolv automatically adds the Service Related Encounter Fields to your form if the event is a service.  myEvolv also does not allow a form to have the same field on it twice.  Therefore, if you add the fields to your form in form designer, you gain control of the form field properties and myEvolv will not append them to your form again.

As the automatically appended fields indicate, Program Providing Service and Facility Providing Service are required on service events in myEvolv so you do not want to hide these or make them not modifiable or not required. You can still move them around to make your form flow better. The other fields are able to be hidden.

 

Here is a list of the Service Related Encounter Information field column names so that you can add them to your form:

Form Label Event Log Field Column Name
Exempt from Billing do_not_bill
Activity Type activity_type_id
Client Involved is_client_involved
Program Providing Service program_providing_service
Facility Providing Service site_providing_service
Encounter With encounter_with_id
Service Authorization service_authorization_details_id

 

I added those that I wasn’t planning to display to their own Form Group and hid them.  I left the Program Providing Service and Facility Providing Service as they were in order to allow myEvolv to append those to my form automatically.

form-designer-after

 

When I saved the new form design and opened the event, the Service Related Encounter Fields I did not want to use were gone.

service-encounter-info-after

We are using cookies on our website

Please confirm, if you accept our tracking cookies. You can also decline the tracking, so you can continue to visit our website without any data sent to third party services.