ContributionsMost RecentMost LikesSolutionsRe: Combined Text Summary Field (Order and Clean) Figured out a work around for anybody in the future: 1. Append a not commonly used character to the end of the field that you are going to create a combined text out of. I used "|". 2. Then use the List(", ", Trim(Part($value,1,"|")), Trim(Part($value,2,"|")), Trim(Part($value,3,"|")), Trim(Part($value,4,"|")), Etc Formula posted by Mark, but instead of using a semicolon, you're going to use the special character you appended to the field above. I did warn everybody on staff that that character will break up the text weird if used, and they said they never use it anyway. That's the best I could work out. ------------------------------ Amanda Luna ------------------------------ Re: Combined Text Summary Field (Order and Clean)There may not be a good answer for this... The fields that I am combining in to one are a rich text field, so when I create a combined text it's changing all the "&" to & and all the line breaks to " " The problem I am now running in to is that the Trim(Part($value,1,";")) is using the first semicolon in the text to break it up, which is sometimes contained in the " " etc. Do you know if there's a way around that? Looks like that is the ticket to getting it to sort new - old. ------------------------------ Amanda Luna ------------------------------ Re: Combined Text Summary Field (Order and Clean) Hi, Maybe I didn't reply on top of the comment to which I was referring.. Would you mind elaborating on this: I recently needed to have the Summary field sort by Record ID# which is not alpha. The raw summary field will sort alpha. I used a formula rich text field and prefaced each element with a fake href hyperlink. The hyperlink has a "URL" component, but no words to be displayed, so it ends up being invisible in a formula Rich Text field. "<a href=" & PadLeft(ToText([Record ID#]),7,"0") & ">" & "</a>" ------------------------------ Amanda Luna ------------------------------ Re: Combined Text Summary Field (Order and Clean)Mark, Would you be able to explain this again? I've been trying to figure out where you put this formula, and I'm not having any luck. Is it on the field before you create a combined text? or is it the field that you add to your report? Also, do you happen to have any ideas on how to get this thing to sort by date, from newest to oldest, where the number of texts fields you're combining will vary? I think if I created a field where it's yyyymmdd and then used your method above I'd get most of the way there. I just would then need to sort it new - old. ------------------------------ Amanda Luna ------------------------------ Re: Javascript Using IOL not working?Everett, I would be SOO thankful if you could. Thanks for taking the time! ------------------------------ Amanda Luna ------------------------------ Re: Javascript Using IOL not working?Alas, it looks like there was an update. From QB: "If your implementation includes relying on our internal libraries, those would need to be upgraded as we do not support those techniques. For the most stable and supportable Quick Base implementation, we suggest only using native or support methodologies. As a best practice to custom interfaces, developers should host, maintain and upgrade their own libraries. I believe that is what you are seeing here. The libraries have been recently updated and now your JavaScript cannot find the jQuery library that it was previously using." Anybody know how to update this code below to work with their updates? I wish I could use only native functions, but those seem to be lacking in several areas. //creates colorized rows in Sales appointments --> Sales Log $("table.searchResults tr.ev").css({backgroundColor: "#f2f2f2"}); //concatenates and adds interactions notes to the sales log (function(){ $("img[qbu=module]").remove(); //parameters: var dbid = "XXXXX"; var dbidParents = "XXXXX"; // Homeowner contact details var dbidChilds = "XXXXXX"; // Interactions var apptoken = "XXXXXXXX"; var n = 100; var relatedParentFid = "6"; var relatedParentLabel = "related_contact"; var clist = "6.12.135.136.138"; var slist = "1"; var options = "sortorder-D"; var qbuClass = "QBU_Childs"; var template = "<ul style=list-style-type:none>{{#.}}<li><br><small><i>{{date_created}} <br>{{record_owner}}</small></i> <br>{{conversation_details}} </li>{{/.}}</ul>"; $.ajaxSetup({data: {apptoken: apptoken}}); var rids = $("div.QBU_Childs").map(function() { return this.dataset.rid; }).get(); _.chain(rids).groupBy(function(element, index){ return Math.floor(index/n); }).toArray().each(function(rids, index) { $.ajax({ url: dbidChilds, data: { act: "API_DoQuery", clist: clist, slist: slist, options: options, query: ridsToQuery(rids, relatedParentFid) }, dataFilter: XMLFlatToObj }).then(function(resp) { _.chain(resp.records).groupBy(function(items) { return items[relatedParentLabel]; }).each(function(item, rid) { var markup = Mustache.render(template, item); $("div." + qbuClass + "[data-rid=" + rid + "]").html(markup); }); }); }); function XMLFlatToObj(xml, type) { var data = []; var record = {}; $("record", xml).each(function() { record = {}; $(this).children().each(function () { record[$(this).prop("tagName")] = $(this).text(); }); data.push(record); }); return {records: data}; } function ridsToQuery(rids, fid) { fid = fid || "3"; return "{" + fid + ".EX." + rids.join("}OR{" + fid + ".EX.") + "}AND({78.EX.No Sale}OR{78.EX.Full Demo}OR{78.EX.Sold}OR{78.EX.Reload})"; } })(); //concatenates and adds field notes to the sales log (function(){ $("img[qbu=module]").remove(); //parameters: var dbid = "XXXXXX"; var dbidParents = "XXXXXX"; // homeowner contact details var dbidChilds2 = "XXXXXX"; //sales appointments var apptoken = "XXXXXXXXXX"; var n = 100; var relatedParentFid = "14"; var relatedParentLabel = "related_contact"; var clist = "14.106.104.105.102.100"; var slist = "1"; var options = "sortorder-D"; var qbuClass = "QBU_Childs2"; var template = "<ul style=list-style-type:none>{{#.}}<li><i><small>{{date_modified}}<br>Appointment Date: {{appointment_date}}<br>Created by: {{record_owner}}<br></i></small>{{{field_notes}}}<br><br></li>{{/.}}</ul>"; $.ajaxSetup({data: {apptoken: apptoken}}); var rids = $("div.QBU_Childs2").map(function() { return this.dataset.rid; }).get(); _.chain(rids).groupBy(function(element, index){ return Math.floor(index/n); }).toArray().each(function(rids, index) { $.ajax({ url: dbidChilds2, data: { act: "API_DoQuery", clist: clist, slist: slist, options: options, query: ridsToQuery(rids, relatedParentFid) }, dataFilter: XMLFlatToObj }).then(function(resp) { _.chain(resp.records).groupBy(function(items) { return items[relatedParentLabel]; }).each(function(item, rid) { var markup = Mustache.render(template, item); $("div." + qbuClass + "[data-rid=" + rid + "]").html(markup); }); }); }); function XMLFlatToObj(xml, type) { var data = []; var record = {}; $("record", xml).each(function() { record = {}; $(this).children().each(function () { record[$(this).prop("tagName")] = $(this).text(); }); data.push(record); }); return {records: data}; } function ridsToQuery(rids, fid) { fid = fid || "14"; return "{" + fid + ".EX." + rids.join("}OR{" + fid + ".EX.") + "}"; } })(); Here's my IOL for the second two scripts (the ones that aren't working) iol <img qbu='module' src='/i/clear2x2.gif' onload="javascript:if(typeof QBU=='undefined'){QBU={};$.getScript(gReqAppDBID+'?a=dbpage&pagename= /iol &rand='+new Date().getTime())};"> ------------------------------ Amanda Luna ------------------------------ Javascript Using IOL not working?Hello all! Without making any changes to the app at all, I come in this morning and parts of my app that rely on a Javascript page are not working. I checked on a different app that uses the same code, and it is also broken there. Is anybody else having issues this morning? The code uses the IOL technique, but other parts that use that same technique are working fine.... ------------------------------ Amanda ------------------------------ Re: Adding If Statement to URL FormulaWorked like a charm! Thank you. ------------------------------ Amanda Luna ------------------------------ Adding If Statement to URL FormulaHey all, I wanted to know if anybody knows how to add an if statement to a URL formula with javascript? Currently my formula looks like this: var text url=URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&_fid_30=Sent&_fid_29=Sent&apptoken=XXXXX&rid=" & [Record ID#]; var text ifStatement=If([Submitted for Payroll Log] != "Sent" and [Commission for Homeowner] != 0, $url, " "); "javascript:" & "$.get('" & $url & "',function(){" & "location.reload(true);" & "});" & "void(0);" Everything is working great except for the button is showing up still when the parameters: [Submitted for Payroll Log] != "Sent" and [Commission for Homeowner] != 0 are met when it shouldn't be. ------------------------------ Amanda ------------------------------ SolvedRe: How to get HTML to display in field?Just figured it out. In case anyone is running in to the same issue, you use three curly braces instead of two on the field where you need to render the html. So {{{field}}} should do the trick. ------------------------------ Amanda Luna ------------------------------