How does one get the total number of slides? - articulate-storyline

In Articulate's Storyline product, how does one retrieve the total number of slides (or pages) in a storyfile or project?
There's not much documentation so it's kind of hard to figure out how to query common environment values like this. If we can get the total number of slides then we don't have to manually set a value for it.

One must manually set and update a variable to store the number of slides.
The most lengthy conversation on the matter seems to be found here at the Articulate forums.
In that thread the users and staff describe the need to manually define such a variable.
I asked the question on the official forum more directly here, and so far have not received a response.
Another poster at that forum mentioned using PHP to solve this problem, but unfortunately we can't add the requirement of PHP to the final product. I'm sure some server side language tricks might be used to solve this issue, but that also adds the dependency of a particular server-side language.

The Answer Mark gave is correct. So if you want to track the number of question slides in a quiz you would either hard code the value in a variable such as totalQuestions, or increment it as you go through each slide using adjust variable trigger. To call that value and display it on screen you would just add it to a text field and surround it with "%".
EG. "You have answered %Results.ScorePoints% out of %totalQuestions% questions correctly."
I find it rather pointless to hard code it since it's just as easy to put the value in the text field at the end. Using the increment method seems more logical because then you can add more question slides without having to adjust the variable or results screen each time.

I usually load frame.xml, browse for all slidelink tags and sort all slides by their Id.
Usually you get something like slideid=_player.5xoxGTW6QCh.6bmeRt3tCqP, where 5xoxGTW6QCh is the scene id and 6bmeRt3tCqP is the slide id. displaytext also gives you the slide title.
If you browse for slidetranscript and match the Id for each transcript you also get the slide notes.

Articulate 360 now has an internal (Built-in) variable for this and other counts. See Project.TotalSlides and Menu.TotalSlides
See https://community.articulate.com/series/articulate-storyline-360/articles/storyline-360-add-slide-numbers

Related

cfinsert is picking up my search input field in a different form

When I submit my form I am getting an error from my cfinsert function because there is not a database column name "SEARCHFIELD". The problem is "SEARCHFIELD" is not an input in the form I am submitting.
Both forms have close and open tags so I am not sure why my search form input is being referenced in my main forms submission?
Any thoughts?
Two ways I can think of to avoid this, without seeing your actual code it is hard to guess where SEARCHFIELD is coming from. As some of the comments pointed out it would most likely be from a CFPARAM or the name of your submit button in the form.
The first way you could tackle this is the CFINSERT tag has an attribute named formfields where you can list off the columns you wish to insert with. You can see that here in this doc link:
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7c78.html
Another way you could do this is you could add code to remove SEARCHFIELD from the FORM scope prior to running the CFINSERT. Which would be as simple as:
<cfset StructDelete(FORM, "SEARCHFIELD") />
You could check to see if it exists and if so then delete it but the StructDelete() will run without issues even if the field does not exist.
I personally do not use CFINSERT/CFUPDATE and I know the default opinion in the community is not to. They do have some benefits though that often are overlooked in that they do parameterise the SQL and offer at least some safety from malicious people. Without knowing anything about what you are doing it is hard to say if using them is actually a shot in your foot in the long run or something just fine to be doing.

Setting the controlsource value of a listbox using Properties Window

I am new to VBA and am currently still studying the most basic ideas of the language. I haven't gotten that far in my VBA Code studies to write the code I need by hand, so, in the mean time, I have been using the VBA Editor to enter Property Values via the Properties Window. This has been proving far more difficult than I anticipated. My Goal is to create a drop down list for a VBA Form. I understand one of my options is to reference a range of cells in my excel worksheet by inputting it into the value field located right of the ControlSource Property. My attempts to input the desired range always comes up with the same error:
Could not set the ControlSource Property. Invalid Property Value.
I have tried looking in the VBA Help files and even searched online. I haven't had any luck finding the proper syntax to enter into this field.
I am assuming I may run into similar issues as I try to set other property values through the Property Window. Thus, I am diligently studying my VBA courses so I can simply write the raw code. But that takes time and I need this form to work as soon as possible.
Is there anyone out there that wouldn't mind lending me their brain for a moment? I would be most grateful. Having this working would bring a lot of stress off of me.
Thanks for reading!
What tigeravatar mentioned, works fine for me, for the ComboBox as well for the ListBox.
If I enter =a1:b5 into the ComboBox' RowSource, I see the values of the cells if I open the form and the Combobox. Tigeravatar's notation with $ and sheet! may be more reliable for the productive version.
The RowSource is where the boxes get their displayed items from. The ControlSource is where the chosen value finally is linked to. So if I write just A10 to the ControlSource, then open the form, then pick a value, close the form, I see the chosen value filled to the Excelsheet field A10.
Sometimes it helps to start a fresh UserForm and to add some simple fresh controls. If you seek around, you will probably alter property values that influence the behaviour in an unexpected way, and then you get lost. I have tested with Office 2010. If you have another version, it may be important to forum readers to know.

Alter input of form before it is submitted

I'm creating a multilingual Drupal site and trying to implement a search function, that only displays results in the current language, that the user is viewing the site through.
Using Drupals own searchfunction at /search/node it is possible to select which language to search for through the "Advanced search" options, and it works perfectly. However, I dont want to expose these language selectboxes, I just want it to only search in the current language automatically.
What's the best option to do this?
I have one solution where I create a hook_form_alter function, that sets the #default_value in the language selectboxes to the current language, and then I hide the whole "advanced options" with in css. This doesnt seem very right though.
I think the most clean solution would be to hook into Drupals form-processing process and append ex "language:en" to the input text, but I cannot get this to work.
Does anyone know if it is possible via one of the Drupal form related alter functions, to get a hold of the input text and alter it before drupal does its final processing of it?
To answer your question specifically, while using 'hook_form_alter', you have a referenced variable called '$form_state'. This stores the values in the form, and any change there will be passed further.
Also,
I think setting a default value and hiding the field is a good solution as any, only, if you are hiding it you should do it server side, while altering the form. The same field you are setting the default value to. like this:
$fieldname['#type'] = 'hidden'.

MS Word 2007 - How to set up placeholder text to mimic text but not formatting

I'm probably biting off more than I can chew with this particular problem, but I'll try to be as specific as possible in case it's within my scope. Disclaimer: I'm not terribly experienced with MS Word, beyond simple data entry/some formatting, and I have absolutely zero experience working with macros or VBasic. Unfortunately, I'm afraid the solution to my problem will come in the form of one of those last two.
THE GOAL:
What I want to do is to have placeholder text throughout my template document that will change content but not formatting when the first instance of it is changed. Basically, I'm writing a template for support manuals for a software suite. Each app has certain similar features like the menu bar, data entry screen, diagnostic log screen, transaction history, etc., so I am pre-writing those sections and using placeholders when I need to insert certain app specific properties.
I started off using the Insert->Quick Parts->Document Property->Subject tool which I used as a placeholder for the app name. I set the Property to [Subject] and then used Insert->Quick Parts->Field->Subject throughout the document, wherever I needed to include the app name. This worked fine in this case because the app name will always be capitalized. I simply change the text in the first [Subject] (which is content controlled) and update the fields throughout the document, and they all match nicely, easy-peasy, work done, go home and drink beer, right?
Not quite.
Our software handles part tracking via scanners and SQL Server, so while the interface and menu in the apps remains largely unchanged, the parts they track change from app to app. Because of this, I need to change the part name when I reference it within the text of the manuals; for example, if I'm working in ToiletPap.app and our TP is tracked by the roll, I need every mention of [Component] to be changed to roll. If I'm working in LightBulbs.app, I need [Component] to say bulb.
My first efforts went toward creating a custom doc property called Component using the Advanced tab under the Document Properties dropmenu. I then created a plaintext content control around my first [Component] titled Component and made my next [Component] a field with modified code: {COMPONENT * MERGEFORMAT}. This comes from copying what I can find when [Subject] works. This didn't work at all; updating the text in the first CC doesn't change the Content doc prop, and my fields return "!Undefined Bookmark, COMPONENT".
I got close to what I need by using the [Comments] doc property, set initially to [Component]. I used it just like [Subject], but (this is when I realized that capitalization was going to be an issue) when I mention my [component] in-text, as often as not, I need to to be lowercase instead of upper.
I've looked on MS's forums and a few others as well as here on SO, and I can't find anyone who's trying to do the same thing, much less an answer to how. Please keep in mind when answering, it would be a great help to me if you would include step-by-step instructions on how to enter/implement the code you provide because, as I mentioned, I have no idea how to go about editing macros/VBasic for MS Word.
To restate and summarize my overall question: How can I use a placeholder that displays the text "[Component]" so that, when I change the first instance of [Component] to something else, say "hopper", every subsequent instance of [Component] is updated to hopper but maintains its current capitalization and formatting scheme?
Apologies for the length of the request, but I wanted to make sure I explained the situation as accurately as possible. Thanks in advance for your consideration and responses.
I managed to solve this one after a couple extra hours of tinkering. I didn't need macros or VBasic, either.
On the first instance of [component] I created a plain-text content control to act as a container (not a necessity, but it makes it look nicer. Will likely cause a problem eventually, but for now, it's working as intended) and bookmarked it. Then, for all other instances of [container] I selected each and used Insert->Quick Parts->Field->Ref with the following field code:
REF Text1 \*Lower
Where "Text1" is my bookmark and "*Lower" indicates all lower case. The *Lower can be replaced with *Upper or *FirstCap to indicate all upper case or capitalize the first letter respectively. Now, each field reflects the text of the first with the capitalization appropriate to each field's location within the document. Just like using the doc prop with [Subject], ^a -> f9 is needed to update all fields within the document.

zend pagination page range vs item count per page

This may be a very basic question. But it is not very clear to me, the difference between
setItemCountPerPage and setPageRange. The zend manual defines both as below. I don't see a difference on reading it. Could someone tell how they are different, may be in the context of actual usage. Thanks
setItemCountPerPage : Sets the maximum number of items to display on a page (default 10).
setPageRange : Sets the number of items to display in the pagination control (default 10). Note: Most of the time this number will be adhered to exactly, but scrolling styles do have the option of only using it as a guideline or starting value (e.g., Elastic).
setItemCountPerPage refers to the ACTUAL DATA you are paginating.
setPageRange refers to the PAGINATION CONTROLS (the little HTML snippet with links to the other pages). Check out the different pagination styles in your pagination controls and it will become very obvious what this is.
You can really use one without the other though they work together so well that I usually see no point in separating them.