ContributionsMost RecentMost LikesSolutionsRe: Formula Numeric FieldTry this: If([start date]<FirstDayOfYear(Today()),14-[Days Used],Round((If(IsLeapYear([start date]),366,365)-DayOfYear([start date])-1)/If(IsLeapYear([start date]),366,365)*14,0.5)-[Days Used]) I briefly tested it and it looks like it's working correctly. ------------------------------ -Tom ------------------------------ Re: Help fix ellipsis, need all text to be shownThis appears to be a browser issue with respect to the javascript alert() function. While the javascript spec does not place a limit on the amount of text you can put into alert(), web browsers have imposed limits on how much of the alert text will be displayed before it truncates the remaining text. It looks like you're using Google Chrome and you can verify that the limit is 1920 characters using the following script: var alertText = ""; var i; for(i=0; i<1920; i++) { alertText += "a"; } alert(alertText); This script will write a 1920 character string consisting only of the letter "a". When you trigger this in Chrome, you should see your alert pop up with no ellipsis. Now, change 1920 to 1921 in the for loop, and when you trigger the updated alert, you should see an ellipsis at the end of the alert. Firefox appears to cut off alerts at 10,000 characters (again, can be verified by changing the 1920 in the above script). If you need to display this information as a pop-up instead of somewhere else in the page, you may need to pop up a modal or something like that instead of using alert(). ------------------------------ -Tom ------------------------------ Re: IOL Refresh a specific field. is it possible?If you can fix the function to always generate a random string that is 15 characters long, you won't need to refresh the field, right? Here's how you can fix the function: In your for loop, you need to have i<15 instead of i<16. This is because you start at i=0 and i is incremented only after the end of the looped code is reached. On the 15th iteration, i=14 so you want to stop the loop after that iteration. The reason you're seeing variable string lengths is because of this formula: Math.floor(Math.random() * chars.length + 1); By adding 1, you can occasionally generate a number that will cause you to look for a position in the string that is actually outside of the string (e.g. you're looking for the 37th character in a 36 character string). Math.random generates a random number between 0 and 1 that includes 0 but DOES NOT INCLUDE 1. Thus, the maximum number you can generate with the edited formula is 35 due to Math.Floor, but this is ok because charAt is 0-indexed! The last character in the string would be obtained by charAt(35) and so there is no reason to add 1 at the end. If you make both of these changes, I believe you should be able to consistently generate 15 character random strings. If you want to get fancy, you can adjust the code to accept a length parameter and set up your function based on that so that you could later change to an 8 character string or a 37 character string if necessary. Disclaimer: I did not test this code with the changes I propose above, but if memory serves, this should get you the correct output. ------------------------------ -Tom ------------------------------ Re: Formatting textInstead of using <i></i>, you could add font-style into the style attribute of the span: "<spanstyle='font-size:12px;font-style:italic;color:# e61515;'>" & [my field goes here] & "</span>" ------------------------------ -Tom ------------------------------ Re: Report report with dynamic filter applied?%20 is actually a URL encoded space ( ), so I believe all of the %20 should be replaced with a space. %22 is a URL encoded quote ("), and those are the ones that should be replaced with \". I think the following formula should work: URLRoot() & "db/" & Dbid() & "?a=q&qid=19#dynamic/{\"sidebar\":[{\"facetid\":16,\"data\":{\"value\":\"B/L Awaiting\"}},{\"facetid\":16,\"data\":{\"value\":\"B/L Sent\"}},{\"facetid\":16,\"data\":{\"value\":\"Payment Received\"}}],\"searchString\":\"\",\"ver\":1}" ------------------------------ -Tom ------------------------------ Re: Dynamic Filter from a ButtonAssuming you're using a Formula - URL field as a button, try replacing all of the %22 with \". I was able to get it to work using the same structure as you have by simply performing this replacement. ------------------------------ -Tom ------------------------------ Re: Quick Base user names loading into Power Query as codesThe codes you're seeing are what QuickBase actually uses behind the scenes to exactly identify a user. I would try using a Formula - Text field with the following formula: UserToName([Record Owner]). This should return a text string containing the user's name in the format "FirstName LastName". ------------------------------ -Tom ------------------------------ Re: Alert popup should not saveI put the javascript void formula above into a Formula - URL field, went into edit mode on a record, pressed the button, and then pressed "OK" on the alert popup. I was able to stay on that same record in edit mode.If this is not working for you, there must be something else going on with your javascript code or the button. You would have to provide more detail on how the button is set up and any other javascript code that might be interacting with the form. ------------------------------ -Tom ------------------------------ Re: Alert popup should not saveOk, if there is no other javascript interfering with the alert, try this: "javascript:void(alert ('1. You must select all healthcare options before totals will calculate.\\n2. A PEG Company and start date/effective date are required in order for the Healthcare Option to populate.'));" The addition of the void function should keep you on the page after "OK" is pressed on the alert. ------------------------------ -Tom ------------------------------ Re: Alert popup should not saveI see above where you're saying that it's to help a user properly fill out a form, but what action or event happens on the form that triggers the alert? Is it an action by the user (e.g. pressing the save button, a custom button)? A javascript event (e.g. focus, blur)? If a custom button, is there anything else in it besides what you provided? ------------------------------ -Tom ------------------------------