Jump to content

Search the Community

Showing results for tags 'concatenate'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Caspio Bridge
    • Caspio Apps for Ukraine
    • General Questions
    • Caspio JavaScript Solutions
    • Tables, Views and Relationships
    • Import/Export and DataHub
    • DataPages
    • Deployment
    • Security, Authentications, Roles, SAML
    • Styles and Localizations
    • Parameters
    • API and Integration
    • Calculations and aggregations
    • User JavaScript and CSS Discussions

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start




Website URL






Found 12 results

  1. Hello, I would like to create a calculated field in tabular report datapage that displays a column in related table as a concatenated string. For Example, many of my apps use the tblPlants as a data source. This is a table of plant species that has a one-to-many relationship with many other tables. I would like to present a field in the report that lists the the botanical gardens for each plant is found in from the tblBG as a string. SELECT STRING_AGG(tblBG.Garden,",") FROM tblBG WHERE tblBG.PlantID = [@field:PlantID]; I get an error that say there is a syntax error near "(", which I take to meant hat the STRING_AGG function does not exist. Is there another function I could use to accomplish this?
  2. Hello, I am quite new to Caspio and I am not sure if what I want to accomplish is possible. I have a table in which I want to add a new field/column. That new column is going to combine/concatenate few of the other columns in the same table, but I need to use an if logic to complete what I want. I did not see an IF option as a text formula. This is what I have written, but the formula is not correct:
  3. I have a formula field which calculates a number value perfectly but I'd like to add a letter to the front of the number so I assume that means I need to cast my result to a string. Here is my formula right now: SELECT MAX(Clean_Job) FROM tbl_ggl_job WHERE Job_Letter = 'CC') + 1 Which gets the max job number that is currently in use and adds 1 to that. So if the max job is CC100 this would return 101. I'd like to concatenate this with the Job Letter CC so that the result would look like CC101. How can I do this?
  4. Hello, I have been using the following code in the footer of a details data page. It previously worked to concatenate an autocompleted value from a virtual field with a text area field called "associatedSpecies." This is based on the javascript solution from Caspio below, but I'm not sure if this is no longer supported by more recent browsers? Does anyone have any insight on how I might make this work again? <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var x0 = document.getElementsByName("EditRecordassociatedSpecies")[0].value; var x1 = document.getElementsByName("cbParamVirtual2")[0].value; if (x0 && x1) { document.getElementsByName("EditRecordassociatedSpecies")[0].value = x0+"; "+x1; } else { document.getElementsByName("EditRecordassociatedSpecies")[0].value = x0 + x1; } } document.getElementById("caspioform").onsubmit=concatenate; </SCRIPT>
  5. Hello. I would like to concatenate two text fields (both foreign keys) and populate a third text field in the same table with the concatenated value when submitting a DataPage. I understand how to do this when I am concatenating the stored value of the fields, but I would like to concatenate the display values of the two lookup fields, not their stored values. Please advise.
  6. Hello, I've got a submission form with 2 fields that I need to concatenate into one field (ideally with a space between the values as it's a 'first name' and 'last name' value that need to be put into a 'full name' field. Again, I'm trying to do this on Change for First or Last name so Full_Name autofills as the user enters values. The code I'm using below doesn't work so I must be missing something. If someone can look at the syntax that'd be awesome. <SCRIPT LANGUAGE="JavaScript"> $("#InsertRecordFirst_Name, #InsertRecordLast_Name").change(function(){ var v_first = document.getElementById("InsertRecordFirst_Name").value; var v_last = document.getElementById("InsertRecordLast_Name").value; var v_fullname = v_first + v_last; document.getElementById("InsertRecordFull_Name").value = v_fullname; }); </SCRIPT>
  7. Having trouble trying to concatenate using onchange. the variables are derived from cascading dropdowns. Would like to see the concatenation results change as the dropdown selections are changed (this is all before submit on a form). <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var one = document.getElementsByName("InsertRecordEmployee_Document_Title").value; var two = document.getElementsByName("InsertRecordEmployee_Document_ID").value; var link = (one+" "+ two); document.getElementsByName("InsertRecordEmployee_Document_Link")value = link; } document.getElementById("caspioform").onchange=concatenate; </SCRIPT> Also Tried: <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var one = document.getElementsByName("InsertRecordEmployee_Document_Title")[0].value; var two = document.getElementsByName("InsertRecordEmployee_Document_ID")[0].value; var link = (one+" "+ two); document.getElementsById("InsertRecordEmployee_Document_Link")value = link; } document.getElementById("caspioform").onchange=concatenate; </SCRIPT> Unfortunately no luck. There is a report right above this form so I used the following which also didn't work: <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var one = document.forms[2].getElementsByName("InsertRecordEmployee_Document_Title")[0].value; var two = document.forms[2].getElementsByName("InsertRecordEmployee_Document_ID")[0].value; var link = (one+" "+ two); document.forms[2].getElementsById("InsertRecordEmployee_Document_Link")value = link; } document.getElementById("caspioform").onchange=concatenate; </SCRIPT> Would really appreciate if anyone can guide me in the right direction. Thanks
  8. Our database was created before formulas were allowed in tables. Due to relationships, table restrictions and being live, I would like to fix this without using formulas. I have a submit form that is creating a Work Order Number by concatenating the Equipment_VIN and Time Stamp. In the form the Equipment_VIN is chosen by drop drop down from an equipment table. The form works perfectly. When I change the Equipment_VIN to autocomplete so the VIN numbers are easier to find the element of the VIN is no longer pulled by the script. Anyone have an idea as to why this is happening? Here is the script I am running in the footer. The script points to an HTML block div that is called "won" for work order number. <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var position1 = document.getElementById("InsertRecordEquipment_VIN").value; var position2 = '[@cbTimestamp]'; var allpositions = position1 +" "+ position2; document.getElementById("InsertRecordWork_Order_Number").value = allpositions; document.getElementById("won").innerHTML= "Work Order Number is: " + allpositions; } document.getElementById("Submit").onmouseover=concatenate; </SCRIPT>
  9. We have an App that ideally we would like a user to be able to use the Bulk Edit facility to amend a value within a field and have this applied to all applicable records. So far so good. But we also need that value added to another notes type field within each of the affected records. In other datapages we use some javascript to concatenate the "value" to the notes field - you press Update and it all works great. Ideally would love to be able to do this with a Bulk Edit facility. However we have tried it and it did not seem to work. Perhaps the JS just wont work in this setting. Anyone any ideas for how we might achieve same or similar effect? George
  10. I see many JS examples, but none addressing multiple datapages on the same webpage. I have two text variables that I want to concatenate in the 3rd datapage on my update webpage. I'm using the code attached in the footer of the detail page to no avail. I've tried several alternatives on the last line but none worked. The error associated with the last line below is "Object doesn't support property or method 'getElementById'. <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var temp11 = document.getElementById("EditRecordWhere_Sa").value; var temp12 = document.getElementById("EditRecordWhere_Su").value; var temp10 = temp11 + temp12; document.getElementById("EditRecordWhere_Text").value = temp10; } document.forms[2].getElementById("Mod0EditRecord").onmouseover=concatenate; </SCRIPT>
  11. Hello Jan it's me again, I have these strings in the calculated field, that I wish to put commas followed by spaces in between them. I tried simply putting a plus sign to add up the fields, it works, but whenever a field is empty, I am left with the "commas" and the "spaces" showing in the results. My question is: Shoud I be using the STUFF and SPACE function to put a comma and a space? Such comma or space should not show whenever there is nothing to use comma or space for. Is there any other way? Here below is what I have. Probably not a good practice at all. [@field:Server]+', '+[@field:Training]+', '+[@field:Telecom]+', '+[@field:Hardware]+', '+[@field:Software] Results: Server Technology, Education & Training , , , The fields Telecom, Hardware, Software are all left empty by the user. The results are showing only the commas and the spaces that I added up.
  12. Good afternoon, I am attempting to use the Javascript posted in the solutions to combine fields. In my case I have three fields I am looking to combine. Employee_First_Name, Employee_Last_Name, and Employee_ID. The ideal formatting of this would be Lastname, Firstname - EmployeeID (For Example Smith, John - 111111) Here is the script I have that is not currently combining the fields let alone getting into the details of formatting. This is being deployed in a submission datapage. <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var Employee_First_Name = document.getElementById("InsertRecordEmployee_First_Name").value; var Employee_Last_Name = document.getElementById("InsertRecordEmployee_Last_Name").value; var Employee_ID = document.getElementById("InsertRecordEmployee_ID").value; var Employee_Selector = Employee_Last_Name + Employee_First_Name + Employee_ID; document.getElementById("InsertRecordEmployee_Selector").value = Employee_Selector; } document.getElementById("caspioform").onsubmit=concatenate; </SCRIPT> Thank you for your time!
  • Create New...