Follow @dporton

I am more that just a survey : The Login System ( 3 / 3 )

In this final article about the login system we will see how we can validate the user login credentials via a system we have created. We will create a user survey and get our menu system to validate against that. I will show you how you can use ODBC to connect the two surveys together and ensure that only the correct users are allowed to login

Read more

I am more that just a survey : The Login System ( 2 / 3 )

In the last article we saw how to create the questions that would hold our login info and the script to handle the actual logon process. In this article we will explore using the DPM object to authenticate our users to decide if they can login or not and take a look at the IsInRole feature.

Read more

I am more that just a survey : The Login System ( 1 / 3 )

In this next set of articles I am going to show you how we can take Data Collection Scripts and get them to make some cool things. To me a survey can be so much more than just a survey, it can, with the use of some simple concepts, be a dashboard , online comments cleaner, panel or report delivery system. So what skills do we have to have to make let’s say a very simple dashboard system. Well if you know how to write a data collection survey , you know how to edit JavaScript , you have read my posts on ODBC connections and have learnt HTML you have all the tools you need.

Read more

Add Context , Populate & Strip HTML out

You would have recently seen in LinkedIn that Barb asked the following question. “When you add html code into your survey, it displays beautifully but then it displays as code in your tabs. Is there a way in a DMS to globally eliminate any HTML code?” and I pointed him to a post that had been written awhile ago. Also in my comment I mentioned that I had a script that would add a context to an MDD and then strip out the HTML and put just the text in it. This article shows you the code for that script.

Read more

Upload File example.

Its been a while since i wrote something , so i thought i better step up my game and get posting again. Every so often i am asked if I had ever written a script to upload a physical file onto the data  collection server. So this article will show you how this can be done, the main thing to think about is you must be able to copy some files to the server and make a few directories. If you are running this in a cluster you will have to think a little differently , but here is some code that can be used.

Read more

Question Example : Grid – Headers Top Bottom Left Right

Description : This examples shows you how your grid can have headers on the Top, bottom, left and right of the grid.

V601 Author Wizard Files : Click Here Copy entire folder to your templates folder.

Professional IVS File : Click Here, Click File, Import Metadata in professional to load.


Question Example : Grid – Headers Top Bottom

Description : This examples shows you how your grid can have headers on the Top and the Bottom of the grid.

V601 Author Wizard Files : Click Here Copy entire folder to your templates folder.

Professional IVS File : Click Here, Click File, Import Metadata in professional to load.


Question Example : Grid – Headers Left Right Middle

Description : This examples shows you how your grid can have headers on the left and the right and the middle of the grid.

V601 Author Wizard Files : Click Here Copy entire folder to your templates folder.

Professional IVS File : Click Here, Click File, Import Metadata in professional to load.


Calculating Points Update

Here is another way that points could be worked out using custom properties. First off put the values in the metadata

Metadata(en-AU, Question, label)

Q1 "Gender" categorical [1]
    {
    	_1 "Male" [iScore = 10],
    	_2 "Female" [iScore = 20]
    };

End Metadata

In this case Male is worth 10 points and female is worth 20. Then in your routing write a quick function to loop the results and total up the score.

Routing(Web)
Dim iTotal

Q1.Ask()
iTotal = iTotal + Score(Q1)
debug.MsgBox(ctext(iTotal))

Function Score(oQuestion)

	Dim oResp,iScore

	For each oResp in oQuestion.response.value
		iScore = iScore + oQuestion.categories[format(oresp,"a")].properties["iScore"]
	Next
	
	Score = iScore
	
End Function

End Routing
%d bloggers like this: