How do I make subform row items appear only once in an HTML table in zoho creator snippet pages? - crm

Table Screenshot I need a single row of Engineer with count 2 in head count
I have attached a screenshot. Category fields are fetched from a subform rows and rows can contain similar categories. I want to show category only once in this table with its count in head count. For example Engineer - 2 and not as it is currently being shown.

Use the distinct option from Zoho Creator data access task to get the unique list of Category. Then use this list to fetch the count of each item.
This also depends on how the subform was included in the main form and whether you are looking to fetch the count per each record of the main form or for all records in the main form.
If the subform was directly created insider the main form, you will have to follow the above method. If the subform was created separately and then embedded into the main form, you can directly apply the Count and Distinct operations instead of iterating through all values.

Store the Category in the list. in loop check, if the category already exists or not then add into list.

Related

If it is possible, how do I create a custom field containing a document number on NetSuite in a saved search?

In NetSuite, I am setting up a new (currently untitled) saved search that is meant to display three columns simultaneously: Invoice document number, Sales Order document number and Item Fulfillment document number.
I have configured my transaction saved search to display invoice document type. Sales Order document number is called Created From which is a NetSuite-created field and displays normally as desired.
There is a field called Document Number, unfortunately it responds closely to the criteria setting whether document types are set to Invoice or set to Item Fulfillment. Setting both does not meet my desired output.
I believe there is a way to somehow have all three document numbers present in the same saved search as their own unique columns.
While editing the saved search, I have attempted to create a new column called "Formula (text)" which is a field containing the formula {number}, this column appears as a second Invoice document number instead of the desired Item Fulfillment document number.
While editing the saved search, I have also tried another "Formula (text)" field containing the formula {tranid} which also results as another Invoice document number column instead of the desired Item Fulfillment document number.
Result of both above attempts: https://i.ibb.co/KyDP7Z5/2019-06-12-13-55-58-Window.png
I tried going to Customization > Lists, Records & Fields > Transaction Line Fields to create a new custom field, containing the above as defaulted formulas. The result is exactly that of the above image.
I tried going to Customization > Lists, Records & Fields > Transaction Body Fields to create a new custom field, where the content is referenced by another Saved Search. I expected that if I can pick the document number column from the "item fulfillment lookup" saved search, then that would appear as a separate column bearing the Item Fulfillment number.
I marked the document number column inside the "item fulfillment lookup" saved search as the summary type: "group" as well as give this saved search "Document Number" as an available filter in order for the "item fulfillment lookup" saved search to appear for custom columns.
Unfortunately, this yielded an empty blank column.
I know and I admit that I am doing something incorrect and would much appreciate it if there is an alternative solution or workaround to achieve this desired objective (all three document numbers to appear in a single saved search).
In your saved search Columns, at the end of the drop down list where you choose the columns, you can choose related records fields.
You didn't say which record your search is based on, but assuming your search criteria is on Sales Order, then you can use the following:
To get the related Item Fulfillment:
Fulfilling/Receiving Transaction Fields ... and then choose Document Number
To get the related Invoice:
Applying Transaction fields ... and then choose Document Number

Showing count of content based on the select list values Drupal 7

I have a requirement in which I need to show some content along with its count based on values in a select list. I wanted to display the allocated,released and resigned resources of a particular department in a selected date range. Using views, date range and department fields are created as exposed filters.
Created a content type for creating resources. The Resources content type is having action as a select list with values allocated,released,resigned. Department is another select list and date field is also added.
Please help me with an answer if views module is not enough. Provide some other solutions also. I'm using Drupal 7.
I figured out how to show node count in views. In my view I’ve some exposed filters and passed my select list cck field as contextual filter. If no result available I made the view to display summary as row count. In the template file, I’m planning to do some calculations for showing the resources count in and out of the project. Please correct me if there is anything wrong in this approach.

Populate Multi-Select widget names from related values

I have a multi-select widget bound to a table that only contains relations. I want to use the related values for each record to populate the multi-select name.
Parent-Table
- Child-Table-One
- Child-Table-Two
No matter which way I try using the multi-select name paths, only the first record name in the multi-select gets populated with the related value from the related child table, the others just display the record ID of the Parent Table.
Do I need to use a function somehow to iterate through all records to get the related values for every record?
Binding to the Relation should get you a list of records. Assuming you're trying to get list of the display names, this should work:
(#datasource.item.Child1).concat(Array.from(#datasource.item.Child2))

Lookup field appears as numerical values instead of text on Access report

I am trying to create a report putting a field called contact which has the name of a person. This name is linked directly to another table where I keep all the contacts.
For some strange reason, when I include this name (which in query view displays as the name of the contact), instead of the name appearing, the unique ID number is shown on my report.
As mentioned in the article cited in the above comment, you can use a Combo Box control on your report to do the lookup for you. To see how this can be done, create a new report based on the table containing the lookup field, then drag and drop that field onto the report. That will create a Combo Box control with properties that look something like this:
Row Source: SELECT [Clients].[ID], [Clients].[LastName] FROM Clients;
Bound Column: 1
Column Count: 2
Column Widths: 0";1"
You could use a similar Combo Box control on your actual report to display the client's name rather than their numeric ID value.
Another alternative would be to change the Control Source of the report's Text Box control to have it do a DLookUp() on the table. If the lookup field is named [client] then changing the Control Source of the Text Box to something like
=DLookUp("LastName","Clients","ID=" & [client])
would also work.
I wanted to add to the great answer by Gord:
When using a "web" database (started in Access 2007 I think), you cannot change a report's fields to ComboBox style, nor can you use DLookUp(). (web databases lack a ton of features)
The workaround for this, if you want to create a Web-Report that uses lookup fields, is to create a Web-Query first based on your Web-Table (all the Web-* stuff has a www planet icon over the logo, if you create a new Web-DB in Access 2007+ you'll see what I mean)
So, instead of Table -> Report, you'll have to do W-Table -> W-Query -> W-Report.
Then, the only thing you need to customize to get the data right is the W-Query. Start by trying to reproduce the look in the query to match what you want users to see in the report. Note that here in the query, lookups will work fine (instead of the unique ID's, you get field names like you want). However, this will not carry over to the report. To do that, you gotta get the actual text field name you want into the query:
You should already have one table in your query; start by adding the table that your first lookup field points to. For example, the table I want to print is called Stock_Boards, and it has a lookup field called PCBID_lookup that points to the table Stock_PCBs.
Since you're using lookup fields, there should already be a relationship line between the two tables when you add the second one. If there isn't, something has gone horribly wrong.
Now, see how that line connects two fields on the two different tables? For example, I've got my PCBID_lookup field on my Stock_Boards table, which connects to the ID field on my Stock_PCBs table. If I created a report from this now, PCBID_lookup would be a number, a number that correlates to the ID of a record on Stock_PCBs.
To fix it, I will add the name field I want to show up on the report. In my example, that happens to be a Part Number, rather than the ID. I add the PartNumber field from my Stock_PCBs table to the query, and remove the PCBID_lookup field of the Stock_Boards table from my query.
Since PartNumber is what I want to show up on my report, it effectively replaces the original field (PCBID_lookup)
Repeat for all lookup fields you want in your report.
I had 1 more: I removed the Status field of the Stock_Boards table (which was an ID/Lookup) and added the 'Status' field from the Status table (which was the actual text name)
When finished, your query should look exactly how you want the data to appear, without any special tricks or asking Access to do something unnatural. Save your query, and create a web-report from it. Done!

Views 1: Filter by custom table/field (or using Argument Hand. Code)

I have a page which should list nodes. The views is called from a locality page (a taxonomy term page). What I need is almost the same as using the Taxonomy: tid in arguments and passing the tid.
I can't use the term_node table, as (for other reasons) we have a custom table term_node_hierarchy (with nid and tid only). The table term_node_hierarchy is like term_node but also saves the tid of the parents (from an "external" code)
I've been looking for options but still no joy.
Currently I'm building an array of the nid's that should be displayed on the current page, and passing them like print views_build_view('embed', $view, $matching_nids); but the Argument Node: ID states This argument is a single Node ID. As said, only the first node is displayed when printing the views. It would be great if it could filter on more than one nid.
I'm open to any kind of suggestions on how to do this.
Thanks
You could create your own module for this. You could populate the $page_content variable with the results of your own custom query where you allow the user to sort against multiple nids. You could do this a number of different ways. You could display a list of the existing nids with corresponding checkboxes, so that, when the user clicks submit, all the nids that match the selected checkboxes get used in the query. Then you just display the result of that query. That's the easiest way I can think of to offer that degree of flexibility.

Resources