Jump to content

casyana

Caspio Ninja
  • Content Count

    39
  • Joined

  • Last visited

  • Days Won

    2

casyana last won the day on April 1 2016

casyana had the most liked content!

About casyana

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. You are right, there is no such feature in Caspio Bridge, you cannot search for duplicates in the DataPage, but you can create a simple tabular report and group by address field.
  2. Please, put your parameters in single quotes in order to make your criteria working, and add N infront, if there can be non alphabetical characters in your parameters. So it will look like: where Date>=N'[@BeginDate]' AND Date<=N'[@EndDate]'AND PreCall_SupervisorLocation=N'[@Location]' AND PreCall_Supervisor=N'[@Supervisor]' AND PreCall_AC=N'[@AC]' But in the formula above all criteria are required, otherwise you need to use case statement which will make your calculated field more complected. And one more comment. To sum all your fields correctly (ignoring blank values), you need to use IsNull function. Like this: (sum(IsNull(Listening_Listen),0)+sum(IsNull(Listening_Concerns),0)+sum(IsNull(Listening_Probe),0)+sum(IsNull(Listening_Paraphrase),0)
  3. Use field name with select, not field parameter. Your calculated field will look like this: select(sum(Listening_Listen)+sum(Listening_Concerns)+sum(Listening_Probe)+sum(Listening_Paraphrase))/(count(Listening_Listen)+count(Listening_Concerns)+count(Listening_Probe)+count(Listening_Paraphrase)) from RA_Received where Date>[@BeginDate] AND Date<[@EndDate] AND PreCall_SupervisorLocation=[@Location] AND PreCall_Supervisor=[@Supervisor] AND PreCall_AC=[@AC]
  4. Seems that I misunderstood the problem. Here is an another solution Hope, this one will work for you. You can use SQL statements in the calculated field to sum/count values thought all records, but in this case, you will have the same value for calculated field in all records. Here is the formula: select (sum(field1) + sum(field2) + sum(field3) + sum(field4))/(count(field1) + count(field2) + count(field3) + count(field4)) from my_table Where field1, field2, ... field4 are fields from your table, and my_table is a table name. If your DataPage has any search criteria you should mention them in calculated field after where, here is an example: select (sum(field1) + sum(field2) + sum(field3) + sum(field4))/(count(field1) + count(field2) + count(field3) + count(field4)) from my_table where field1>[@a] AND field2 < [@c]
  5. Hi... It can be done with calculated fields. To sum all field, you can use the following calculated field: (IsNull([@field:Field1],0)+IsNull([@field:Field2],0)+IsNull([@field:Field3],0)+IsNull([@field:Field4],0)) To count not blank value, you can use the following calculated field: case when [@field:field1] IS NOT NULL then 1 else 0 end + case when [@field:field2] IS NOT NULL then 1 else 0 end + case when [@field:field3] IS NOT NULL then 1 else 0 end + case when [@field:field4] IS NOT NULL then 1 else 0 end Now you can just use: [@calcfield:1]/[@calcfield:2] If you don't want to create 3 calculated fields and just want to display everything in one, you can use the following formula: (IsNull([@field:Field1],0)+IsNull([@field:Field2],0)+IsNull([@field:Field3],0)+IsNull([@field:Field4],0))/cast((case when [@field:field1] IS NOT NULL then 1 else 0 end + case when [@field:field2] IS NOT NULL then 1 else 0 end + case when [@field:field3] IS NOT NULL then 1 else 0 end + case when [@field:field4] IS NOT NULL then 1 else 0 end) as decimal) You need to convert divisor to decimal to get correct results, or you can just multiply devisor by 1.0 instead of using cust. It will also give you correct answer: (IsNull([@field:Field1],0)+IsNull([@field:Field2],0)+IsNull([@field:Field3],0)+IsNull([@field:Field4],0))/((case when [@field:field1] IS NOT NULL then 1 else 0 end + case when [@field:field2] IS NOT NULL then 1 else 0 end + case when [@field:field3] IS NOT NULL then 1 else 0 end + case when [@field:field4] IS NOT NULL then 1 else 0 end)*1.0) Hope this helps.
  6. Hi JRoss! I hope, I have a workaround for you. I believe, your DataPage is based on the table JRRESULTSTABLENEW, so field MemberID is from the same table. The workaround is to create a view, based on this table, you can include all fields from the table into the view, you even can name them the same, except of the MemberID, you should rename this field (for instance, name it as Member_ID). After that, change the data source of your DataPage to the just created view, and update your formula to the following: select sum(b.CCO_Place_Points) from JRRESULTSTABLENEW a join Lookup_Places_2 b on b.CCO_Place_ID = a.CCO_PlaceID where a.MemberID = [@field:Member_ID] Hope it helps!
  7. In this case you need a JS to implement it. You may have two cascading hidden virtual dropdowns and you may populate another virtual dropdown with values which are present in both cascading dropdowns. With help of JS you can find which dd has less options and go through each each option in a loop and check (in another loop) if the same option is present in the second dropdown. And if yes, you need to add this option to your virtual dropdown. And on submit you may save this virtual dropdown value to the real field, which has to be hidden on the form.
  8. Do I understand correctly, that your multi-select is the standard multi-select listbox on a search page? If yes, than you were right, that passed values will be separated by ||cb||. In this case, to parse the value you can use the following JS: var str="[@Virtual_City]"; while (str.indexOf("||cb||")!=-1) { str=str.replace("||cb||", " OR "); } I'm not sure how do you want to pass it to the next page. Will you be redirected to it after page submission or you want to have a link? Any way your third page should be predefined criteria. And you need to set Contains comparison type for the City field and receive passed parameter.
  9. Hi Maverick I'm glad, that it helped. I don't think you will experience any issue with document.write, it is supported in all major browsers: http://www.w3schools.com/jsref/met_doc_write.asp Regards, Casyana.
  10. I would propose you to use the following JS in the HTML block: if ( '[@field:Membership]' == 'Basic') document.write(' Link 3 ');
  11. You can use the following JS in the HTML block: Your link if('[@field:field_you_need_to_compare]'=='value') document.write('');
  12. Could you, please, elaborate? It sounds like a cascading form element, isn't it what do you need? http://howto.caspio.com/datapages/form- ... boxes.html
  13. Hi Supra01, Could you, please, elaborate a little bit more: which language do you use to call WS API methods, and from where the dynamic criteria should be taken? For now you may try to create a variable, assign the dynamic value to this variable and use it in the method call.
  14. If you need to use the same field for value and for display for your cascading dropdown, then you can use the following approach. Create a virtual field and use cascading dropdown form element for it, use Courses as display and Start Date as value, and select - sort by value option. Use hidden form element for your real course field. And you have to create a JS function, that will update this fields value with selected virtual dropdown option. This function should be called on form submit. Hope this helps.
×
×
  • Create New...