Entering data fields in a table where rows have a hierarchy

Situation: A store is adding in how much money has been spent on products in their store that week. They can enter the figures either at the individual product level, or at the brand that product belongs to.

So, either at NestlĂ© level, or at KitKat, Milkybar, Aero…

I want to make sure the user has the flexibility to enter figures at whichever level of hierarchy they want, but also don’t want to end up with duplicate or mismatching figures by someone entering in a value at Parent AND at each Child.

This is fine when they first start – we can just disable the Parent / Child field once they choose which level of the hierarchy for that product they’re using.

enter image description here

HOWEVER, the issue I’m having is how can we allow the user to change which level they’ve been using? For various reasons they may need to change from a global Parent (NestlĂ©) figure to specifying a value for each product instead (or if they’ve done it at Child level (KitKat) they may want to actually just specify at Parent level instead).

I don’t want to fill the fields with toggle icons as that’s visually noisy. I don’t want to add a global toggle for Parent / Child because there are many brands out there (Coca Cola, Mars etc) and the user may still wish to enter figures at child level for one brand but Parent level for another).

What is a simple method to allow the user to change from one level of hierarchy they’ve already specified up/down to the other level?

The only thought I currently have is that if the user clicks a Disabled field they will be given a prompt asking if they now wish to add figures at Child level, but that seems like an accessibility fail, and it isn’t really that obvious that a disabled field can be clicked.

Batch Actions in a Data Table when rows have different contexts

In a data table, each row represents a user. Each user has a status. The status can be different based on the users actions within the organization. It is shown in the data table on a dashboard for monitoring purposes. The status of the user can also be changed from this dashboard.

Some rows are also logically grouped together because the users share some commonalities.

I want to know the best way to implement a batch action mode where each row can have different action associated with it depending on the current status of the user.

In the screenshot below, G is for grouped entries. Groups can have a expanded view (Purple) or a Collapsed View (Pink).

The colored tabs are different statuses which can change from one to the next. Yellow > Green > Dark Gray.

How to deal with a person clicking on the select all checkbox (row header) which results in him selecting entries that have no common actions.

Also as groups are also a part of this, is there a way to show the user that the group selected will also be acted upon even if it is collapsed? Or should I disable the batch selection mode from Group altogether but I still need to keep an option to select all the entries of one single group at the same time as well (which will also pose the same problem with different statuses and different actions available on each status).

enter image description here

Allow a fixed Two rows to display product title

Hi,

Please, How to make the product titles AUTOMATICALLY displayed in Woocommerce archive (home & categories) on TWO lines (around 10 words).

The site is not live yet.

I join two pdf files of the Woocommerce archive (before and after). The after one is a photo editing to illustrate.

If you can see I expect:

* To set a permanent and fixed two lines' space for the products' title.
* If the title exceeds Two lines, the 'read more' should be displayed like this: (…)
* Although…

Allow a fixed Two rows to display product title

Using rows from one table as fields in SELECT

I have three tables in my MySQL database – company, extra_fields and extra_fields_info:

mysql> describe company; +-----------------------------+------------------+------+-----+---------+-------+ | Field                       | Type             | Null | Key | Default | Extra | +-----------------------------+------------------+------+-----+---------+-------+ | company_id                  | varchar(64)      | NO   | PRI | NULL    |       | | company_name                | varchar(80)      | YES  |     | NULL    |       | | other_stuff                 | varchar(1)       | YES  |     | n       |       | +-----------------------------+------------------+------+-----+---------+-------+  mysql> describe extra_fields; +-----------------------------+------------------+------+-----+---------+-------+ | Field                       | Type             | Null | Key | Default | Extra | +-----------------------------+------------------+------+-----+---------+-------+ | extra_field_id              | varchar(64)      | NO   | PRI | NULL    |       | | field_name                  | varchar(80)      | YES  |     | NULL    |       | | field_required              | varchar(1)       | YES  |     | n       |       | | field_comment               | varchar(255)     | YES  |     | NULL    |       | +-----------------------------+------------------+------+-----+---------+-------+   mysql> describe extra_fields_info; +--------------------------+-------------+------+-----+---------+-------+ | Field                    | Type        | Null | Key | Default | Extra | +--------------------------+-------------+------+-----+---------+-------+ | extra_info_id            | varchar(64) | NO   | PRI | NULL    |       | | company_id               | varchar(64) | YES  | MUL | NULL    |       | | extra_field_id           | varchar(64) | YES  |     | NULL    |       | | field_value              | text        | YES  |     | NULL    |       | +--------------------------+-------------+------+-----+---------+-------+ 

Here’s an example of some of the data from these fields:

mysql> select efi.extra_field_id, ef.field_name, efi.field_value, efi.company_id from extra_fields_info left join extra_fields ef on efi.extra_field_id = ef.extra_field_id; +----------------+-------------------+--------------------------------+------------+ | extra_field_id | field_name        | field_value                    | company_id | +----------------+-------------------+--------------------------------+------------+ | 1              | is_affiliate_user | y                              | 1          | | 2              | contact_email     | email@gmail.com                | 1          | | 3              | default_currency  | MYR                            | 1          | | 4              | vertical          | 33                             | 1          | | 5              | contact_locale    | en                             | 1          | | 6              | operating_country | MY                             | 1          | | 7              | company_name      | SomeCompanyName1               | 1          | | 1              | is_affiliate_user | y                              | 2          | | 2              | contact_email     | email2@gmail.com               | 2          | | 3              | default_currency  | EUR                            | 2          | | 4              | vertical          | 3                              | 2          | | 5              | contact_locale    | en                             | 2          | | 7              | contact_name      | ContactName                    | 2          | | 6              | operating_country | FR                             | 2          | +----------------+-------------------+--------------------------------+------------+ 

What I’d like to do is use some of the rows in the above output as fields in a SELECT. I’d like to visualise my data like this:

+------------+------------------+------------------+-------------------+----------+ | company_id | company_name     | contact_email    | operating_country | vertical | +------------+------------------+------------------+-------------------+----------+ | 2          | SomeCompanyName1 | email2@gmail.com | EUR               | 3        | | 1          |                  | email@gmail.com  | MY                | 33       | +------------+------------------+------------------+-------------------+----------+ 

As you can see, I’m using some of the extra_fields as field names. I only need to select a few of these fields as depicted above – I don’t need all of them.

I’m not even sure where to start with this, so any guidance would be appreciated.

Is it faster to split a large table into 12 rolling monthly tables & use UNION them for reports or keep large table & delete rows older than 1 year?

My co-worker wants to split a large 158M row stats table into stats_jan, stats_feb, … and use UNION to select from them for reports. Is that standard practice and is it faster than to just use the large table in place and delete rows older than one year? The table is many small rows.

mysql> describe stats; +----------------+---------------------+------+-----+---------+----------------+ | Field          | Type                | Null | Key | Default | Extra          | +----------------+---------------------+------+-----+---------+----------------+ | id             | bigint(20) unsigned | NO   | PRI | NULL    | auto_increment | | badge_id       | bigint(20) unsigned | NO   | MUL | NULL    |                | | hit_date       | datetime            | YES  | MUL | NULL    |                | | hit_type       | tinyint(4)          | YES  |     | NULL    |                | | source_id      | bigint(20) unsigned | YES  | MUL | NULL    |                | | fingerprint_id | bigint(20) unsigned | YES  |     | NULL    |                | +----------------+---------------------+------+-----+---------+----------------+ 

I did manually split the table up and copy the rows into the appropriate month tables and created a giant UNION query. The large UNION query took 14s versus 4.5m for the single table query. Why would many smaller tables take a significantly shorter time than one large table, when it’s the same number of rows total?

create table stats_jan (...); create table stats_feb (...); ... create index stats_jan_hit_date_idx on stats_jan (hit_date); ... insert into stats_jan select * from stats where hit_date >= '2019-01-01' and hit_date < '2019-02-01'; ... delete from stats where hit_date < '2018-09-01'; ... 

The monthly tables have from 1.7M rows to 35M rows.

select host as `key`, count(*) as value from stats join sources on source_id = sources.id where hit_date >= '2019-08-21 19:43:19' and sources.host != 'NONE' group by source_id order by value desc limit 10; 4 min 30.39 sec  flush tables; reset query cache;  select host as `key`, count(*) as value from stats_jan join sources on source_id = sources.id where hit_date >= '2019-08-21 19:43:19' and sources.host != 'NONE' group by source_id UNION ... order by value desc limit 10; 14.16 sec 

Creating a Sharepoint 2013 List with multiple rows under one column header using InfoPath 2013

I want to create an order form with 14 columns and as many rows as possible that will kick off a workflow. my challenge is creating a single List at one go to contain an X amount of rows with a single row of column headings(14) to be saved as a single list and can be editted later.

i am very new on infopath and still finding my way around sharepoint. please asisst.

Thanks,

Sharepoint 2013 calendar days in rows instead of columns

I am trying to align the days of a 2013 S/p calendar vertically instead of horizontally. If there isn’t a way to do that, is it possible to view the calendar as a list where I could modify the list settings to show Sunday on top of Monday on top of Tuesday, etc? I don’t have the ability to modify code, but do have S/p Designer 2013 as an option.