Preliminary Statement: This feature is brand new. It has been well tested in our pristine 'alpha' environment. It has undergone successful 'beta' testing, but only by a few users. Things are almost always a bit different in the 'real' world with broader application. So we encourage you to try developing Intake Forms with 'logic' attributes, and let us know your results. If it doesn't work for you right out of the 'box,' let me know. I will join you in a GoToMeeting session to determine the break and get things fixed right away so you don't lose your momentum. A second preliminary statement: This discussion below has become quite a nice summary of the interactions between Intake Forms, the Instant Database, Variables, <<*Options*, *Optional* and*Repeat*>> blocks. (Oh, and {simple options} as well.) So it likely will be worth your while reading this screen for the scraping lesson as well as the refresher for the interactions possible with !Groupnames! |
What this new tool can do. Previous versions of Pathagoras would assign values scraped from Intake Forms to static variables. The 'Client Name' field from the form, completed with 'Jane Doebergson', would transfer into the Instant Database as variable [Client Name] with a value of 'Jane Doebergon'. Pretty cool, and the new release still does that. But this new release also allows those values, when also assigned to !groupnames! to used in a dynamic and logical fashion.
+-+-+-+-+-+-+
The various Intake Forms discussed in the above sections (Word, Excel and Acrobat) were originally designed simply to gather personal data (client: names, addresses, etc.) from clients/customers/patients. The form would be sent to the correspondent and when the form was returned, you would 'scrape' using the appropriate Pathagoras tool. The values provided would lead to the creation of an instant Instant Database, and a visual display of the record would be brought to the screen. You might see [Client Name] next to 'Janet Doebergon', [Client Address]' on the next line next to the value of '123 Main Street',etc. In every regard, this scraped form was an Instant Database record. When you pressed the 'Go' button, 'Janet Doebergon' will replace each instance of '[Client Name]' throughout the document,'123 Main Street' replaced each instance of [Client Address], etc.. It may have been basic stuff, but the ability of Pathagoras to take advantage of external data yet maintain its 'plain text' chops was a major feat, and it saved adopters of this tool a ton of time.
No atypically, our customers began to ask 'can other data being collected be put to productive use?' That 'other data' being answers to 'Yes/No' or 'True/False' questions (e.g., 'Are there minor children?"), or numerical answers (e.g., 'how many children?''), or positional answers (if I chose the third element of a list of choices, can that positional values be captures and used by Pathagoras to select <<*Options*. . .>> text in the document.
Our early response was, 'Sorry, but no.' The transfer of the requisite information from the Intake Sheet to the document would (we thought) required the end-user (you) to use Word 'fields', and that flew in the face of Pathagoras' plain text philosophy. and shunning of fields. Unless we could make it work with plain text setups, we weren't going to release it. It was all too complex. And a solution was further complicated by the different types of Intake Sheet configurations that Word, Excel and Adobe made available (combo boxes, simple lists, text fields, named cells, validation equations. You name it, it complicated things.)
But we kept on plucking. We knew that !groupname! assignments that we had developed early on in the creation of Pathagoras held the key, but just could not figure out how to capture its potential.Until we did. Now the answer to "Can the collected 'True/False' and numeric data be put to productive use?" is Yes!
Almost any answer to any question scraped from a form (Word, Excel or Adobe) can now be used by one of Pathagoras logic tools associated with a !groupname!. And the beauty is that it's done using plain text features for which we a renowned.
Setting up the form: Simply assign the !groupname! to the Intake Form field that corresponds to the !groupname! in your document. That's it. Examples will follow. When the form is scraped, the value is recorded in the Instant Database record that is initially created during the scraping process, but recorded in a way that they can be used in an <<*Options*!groupname!* . . . >> block (here, it's the positional value) or an <<*Optional*!groupname!* . . .>> block (here, it's a 'True' or a 'False' value); or <<*Repeat*!groupname!* . . .>> block if a number is the returned value.
The only real requirement is that, if using a multiple choice item, i.e., a multiple choice [!groupname!variable] or an <<*Options*!groupname!* . . .>> block, that the same number of choices be provided in the document text as are in the scraped data. So, if the form you are scraping of fieldname !fruit! has 6 choices, but the [!fruit! . . .] variable in the document has only 3 choice, you will get an error. (Remember, if you need to 'stuff ' an additional choice, but with an empty value, you can simply add another slash.)
What we mean by ‘positional value’:
How does Pathagoras knows which value to select for 'groupnamed' variables and <<*Options* . . . >> blocks? No big secret or hidden tricks. It’s simply ‘where does the selected answer exist in the list of choices?' If you select the third item in a multiple choice variable, Pathagoras looks for other document blocks (variables or <<*Options* . . .>> blocks with the identical !groupname! and selects the third position for those as well. You don't need to create and program a field; no Boolean logic needed. So, the variables without a groupname, e.g., '[male/female/non-binary]', '[he/she/they]' and '[!him/her/them]' will all have to be selected individually from the Instant Database screen. But if you add a simple !groupname! just inside of the opening bracket, e.g., [!Client Sex!male/female/non-binary] [!Client Sex!he/she/they], [!Client Sex!him/her/them] etc., the selection of one of the choices (and it doesn't matter which one) will set all other members of that group to the same positional value. It’s that simple. As applied to scraping forms, Pathagoaras can identify the choice (and the number of choices available), and assign those values it to a !groupname!. What we recently discovered was how to carry those values into from the external Intake Form into the Pathagoras system and further into the Pathagoras elements of the document you are working on.
The method by which a selection is recorded by Pathagoras when it scrapes a form and then logically applying that answer to another variable of the same !group! in the document is positional. E.g., position '1' of '2' choices; position '3' of '7' choices'. The position 1(2) or 3(7) is what is 'memorized' by Pathagaoras, ., , not the specific value. The text you desire is ultimately displayed and 'replaced' when you run the Instant Database, but you must understand the underlying logic in order to properly set up (1) the hidden text elements of the Intake Form and the structure of subsequent document variables that will be chosen when the scraped answers are applied against those variables.
Back to Intake Forms: Electronic Intake Forms generally present the client/customer/patient with either a blank space to fill in data or a dropdown list from which to choose a limited choice of answers. Behind that visible section is a field name so that the data can be sent to you in an organized fashion. Sometimes those fields have meaningful names (like Client Name) but frequently they have cryptic names that on the program understands. However, in almost all cases, you have the power to rename the field. And that is exactly what you must do in order for Pathagoras to meaningfully scrape it. The setup requires that each multiple choice the field be the !groupname! used in your Pathagoras documents and surrounded by brackets. If you just are collecting data, just the variable name is fine; e.g. [Client Name]. But if the field is associated with logic, it is (simply) the !groupname! (with the exclamation marks) inside of the brackets.
Some setups specific to the type of form:
Word 'Fancy' intake forms:
You should recall that the variable in a fancy Word Intake Form is contained in hidden text just before the colon that separates the ‘friendly question’ from the space that contains the answer. It doesn’t matter whether the value is simple the space to the right of the colon or is a multiple choice Content Control or a Word list. If you intend the field to be a logical or a repeat field, the hidden variable name will be [!groupname!] Note, if you use 'Select' or Choose One of the below as the first element in your list, Pathagoras will ignore that line as it creates for you the multiple choice variable.
Excel 'Fancy' Forms:
There is a limitation that Excel imposes on how you can name cells. That creates the need for a small variance. In other discussions about using Excel as an Intake Form, we noted that you could not insert the boundary markers denoting a variable (typically '[' and ']' brackets). You would simply type the variable name as the cell name and Pathagoras would add the brackets. The same rule prevents you from inserting exclamation marks to denote the groupname. Our workaround is to add a simple period at the end of the groupname. So if the ultimate variable is !marital status!, the cell name offering "Married/Single/Divorce/Widowed' would simply be called "Marital_Status." (In creating the variable for the Instant Database scrape, Pathagoras will add the boundary markers, the exclamation marks, the various choices and will remove the underscore character that Excel requires for 'spacing'.) It's all automatic. It's all quite elegant.
Adobe Acrobat Forms:
Your ‘deep field’ names will follow the rules for Fance Word Forms.
Setting up your document:
[Variables] Just use the same !groupname! followed by ANY language you want, keeping in mind the position of the original answer that was scraped. if the scraped answer is 'Yes' or (No), put two answers in the variable, with the first part being the 'Yes' response and the second part the 'No' (Of course the options must be separated by a slash. If the scraped answer is any other type of multiple choice, just make sure you have the proper number of options in the document's multiple choice variable. The text can be plain text or it can be a document call. E.g., [!children!There are no children of this marriage/Children, named below, were born of this marriage.] (Tthe obvious next question -- can there be three or more options -- is discussed in the next lesson. Here we are just talking simple 'Yes/No' or 'True/False' type logic.
<<*Options*>>
Here is where we've gotten very 'logical' and fancy. The very same positional value that you have 'scraped' and assigned to a variable can be used as the positional value for <<*Options*!groupname! . . . >> blocks. Just do the same thing you have always done in setting up that Options text. (Remember, since the selection is already established during the scrape, you don't need to add prompt text to your Options block.
<<*Optional*>>
If the form requires a simple, hand typed, Yes or No answer, Pathagoras will interpret the answer in the nature of an Optional (keep it or delete it) response. (The scrape returns a single,simple word, not a multiple choice variable.)
<<*Repeat*>> If the value returned is a number, Pathagoras will handle that as such, an trigger a hunt for <<*Repeat*>> blocks bearing the appropriate !groupname!. Easy peasy.
For 'fancy' Word Intake Sheets.: Here is how it works (it's the same way it works with any other !groupnamed! mutiple choice document.) When Pathagoras scrapes the Intake From, it creates a multiple choice variable Yes/No with the appropriate groupname (in this case, !children!. The works whether you save the record (which we recommend) or not.
Numeric values: Not unlike the Yes/No (True/False) variety of variable creation discussed above, you can similarly type just the [!groupname!] as a variable. When Pathagoras sees that the assigned value is a number, it knows to process that value so that it can be used in your <<*Repeat*!groupname!* . . . >> blocks in the document.
If you have saved the record, and then recall it .
Notes:
You would use this feature when there are more than one (several, many) sections of your document that will present different text depending upon the answer in the form. You would not use this feature if the answer is used in a single location in the document or if the identical answer is used in multiple locations throughout the document. Hopefully the examples provided herein will explain and illustrate this point.
Adobe Acrobat Forms:
So, how will Pathagoras use the scraped data. Quite simply, any way you want. You can use it directly. Just include the identical multiplce choice variable in your document and Pathagoras will replace it with the value you have assigned. Or create another multiple choice variable which contains the text you want in that particular location, the order of the choices being the same order as the selections in the scraped variable. (This is not a new concept. This has always been the way Pathagoras has allowed multiple choices. Remember the [!Client Sex!male/female/non-binary] [!Client Sex!he/she/they], [!Client Sex!him/her/them] etc., sequence.