Number

Reset a numeric value to a default

Caelshadowhunter's picture

Can anybody think of a way to reset a numeric value to a definable default when a change node outputs a YES value?

String to integer using javascript

Swiftlikeninja's picture

Okay I ran into an interesting scenario trying to sort through an xml feed. The Structure I have has a number of completes field and Im trying to get a leaderboard set up with the top completes displayed but the feed has the completes as a string and as such the structure sort sorts them alphabetically. Meaning that 10 would actually come before 2 which can cause some major issues in sorting. I found that if I use a number splitter off the complete index and rebuild the structure w/ the kineme structure maker then sorting works but the structure Im using can range to over 400 members so manually doing this is out of the question and i don't think iterator is the answer. Can anyone assist me in a javascript answer on how to change a substructure in an entire structure list from a string to an integer?

Or even simpler, tell me if Im missing something in the structure sort?