json formatting – How to display past list items related to a column value?

I have the following SharePoint list in which the “Participant” columns are text values (names of people) and each item in this list is a training event. “Evenement” is the type of training and “Jour” means day of the training.

What I need to do is whenever someone hovers on the name of a participant – I need their past training events to show.
For example if “Participant 1” is Alpha and his “Jour 1” is on 11-05-2021 then “Jour 2” is on 12-05-2021 and “Jour 3” is 13-05-2021 and finally “Jour 4” is 14-05-2021. I need all this information to show on a hovercard if possible?

I am not sure if this makes complete sense or not and if it’s even possible but any guidance would be appreciated, thank you in advance to anyone who replies and please be advised I’m only starting with JSON .

Sharepoint List Preview

9 – Programmatically enable the entity view display

I figured it out. You can enable Layout Builder by running the following code in a custom module:

$entity_type = 'node';
$content_type = 'article';
$view_type = 'default';


Hopefully this helps someone else. Having to do it via the UI is painful if you have a lot of content types. I’m actually surprised this isn’t a Drush command yet. Oh well.

Source: https://www.drupal.org/project/drupal/issues/3158916

Webform Computed Data Display Grade and Text based on result

I am building a quiz using webforms and the computed data twig and have a question if something is possible and if there is documentation on how to build this.

The quiz is 20 questions and each answer has a value of 1-5, I have all of the computed data working and it is able to show the final score properly, but was wonder if I could assign a grade and give short text feedback based on the score.

For example:
A user scores less than 70 they would receive a grade of “Below Average”, 70-80 Average and 81-100 “Above Average” and then some text giving them feedback on their score depending on this range they scored in. Is this possible to do in webforms?

Thank you so much for any help!

8 – How to display content tagged with child terms in views?

I have a taxonomy vocabulary general in which I have a reference field to user roles allowed_roles.

I have two taxonomy terms. A and B where A is the parent of B.

Now I selected test_role in the A taxonomy term in allowed roles.

in the views I have added a relationship on Taxonomy term referenced from general.

In the contextual filter, I have added the allowed_roles with the above relationship and provided the test_role as value.

Now when I logged in with the user with role test_role, I can only see those content which are tagged with A. Which is default behaviour of the views and correct.

But I want that I should see all content of A and also those content which are tagged with the children of A.

is it possible with views? or I have to write a custom views relationship? Any idea?

information – How to display quotas to my user without using currency?

Sorry if the tagging is bad that’s my first question here I don’t know what tag I could use.

I’m part of the development team of a GIS (geographic information system) cloud platform (https://sepal.io),. We provide to our user access to storage and supercomputer for free. To avoid that they overload the service we provide we set up a quota system that prevent a regular user to use all our resources ( because of course in the end WE pay for the AWS machines). If a advanced user require more computation we gladely increase it’s quota.

At the moment the quotas is displayed as foolowed to the user :

enter image description here

Some of our user complained that we use the $ sylbol and unit to measure quotas as it make them think that they will need to pay.

How could we display such an information without making people think that we are asking for money ?


We cannot move directly to “%” because the “budget d’instance” is not consumed at the same speed with respect to the size of the computer you’re using each machine will use your budget at a different speed:

enter image description here

Are there any good guidelines around the formatting and display of amounts and numbers in UI, especially for high-density tables?

This might include the alignment of numbers in tables based on type of numerical data, and how to show multi-currency, and negative numbers on a variety of form factors.

mobile – Flashlight switch: display the desired state or the current state

I need to design a view in a mobile application (iOS + android) to scan qr-codes. The view needs a toggle to switch the flashlight “on” and “off”.

I first designed the switch that represented the current state of the flashlight (V1). This means that when the flashlight is “off” the icon shows a crossed out light bulb and when the flashlight is “on” the icon shows a glowing light bulb.

enter image description here

Like toggles work in settings for example:

enter image description here

When I tested my design in a prototype (Adobe XD) is feels very strange to turn on the flashlight by clicking on an icon that shows a crossed out light bulb.

For this reason I have created another variant that shows exactly the opposite:

  • When I want to turn “on” the light, I click on the icon with the light
    “on “
  • When I want to turn “off” the light, I click on the icon with the
    light “off”.

It’s like a play and pause button on a music player

  • When I want to play the song, I click on the play icon
  • When I want to pause the song, I click on the pause icon

enter image description here
enter image description here

enter image description here

I had a discussion with a colleague about whether it makes sense to display what the user wants to achieve, or the current state. Displaying the current state makes less sense to me in this context, because the user knows that the flashlight is off when sitting in the dark. And as I said it feels weird to click on this crossed out icon. Now I am successfully confused how to solve this problem. I think it’s not good to break the switch behavior everyone is used to know, even if it feels weird to me.

What do you guys think?

How to display Product Name in the subject of the Email(Order Confirmation Email)?

I want to display product name in the subject of the Order confirmation email.
I want to display like this
Your Order for LooMantha Refrigerator… has been successfully placed

commerce – Using rules to Flag a Product Display Node on Checkout

Every user is supposed to purchase Particular product only once.

So i have a view to list the Product Display which by using FLAG module i can list only Unflagged Product Display nodes (Products which are yet to be purchased).

The issue now is how to use Rules to Flag the Product Display node on checkout Completion.

Note: i am using Drupal 7.

Your help will be appreciated.

How to output results of an AppleScript image resizing script and display in automator

I am currently using an automator flow that copies finder items, changes them to jpeg, reveals them, and then runs an applescript that presents a dialog for batch resizing by image width. Every now and then, the script misses a couple of files or I prematurely move them from the folder before they have finished. I added a couple of pieces to the automation to

  1. Set value of variable: output
  2. Ask for confirmation: output

This doesn’t really output anything useful, but it does notify me when the script has finished running. Is there some way to output whether or not there were any issues with the script or is this way too crazy of a question to be asking on stackexchange? In advance… No, I’m not very familiar with AppleScript.

Here’s the script – I appreciate any & all advice/help 🙂

tell application "System Events"
    set theWidth to display dialog "Enter the width" default answer "2000"
    set theWidth to the text returned of theWidth as real
end tell
global theWidth
tell application "Finder"
    set some_items to selection as list
    repeat with aItem in some_items
        set contents of aItem to aItem as alias
    end repeat
end tell
repeat with i in some_items
    end try
end repeat

to rescale_and_save(this_item)
    tell application "Image Events"
        set the target_width to theWidth
        -- open the image file
        set this_image to open this_item
        set typ to this_image's file type
        copy dimensions of this_image to {current_width, current_height}
        if current_width is greater than target_width then
            if current_width is greater than current_height then
                scale this_image to size target_width
                -- figure out new height
                -- y2 = (y1 * x2) / x1
                set the new_height to (current_height * target_width) / current_width
                scale this_image to size new_height
            end if
        end if
        tell application "Finder"
            set file_name to name of this_item
            set file_location to (container of this_item as string)
            set new_item to (file_location & file_name)
            save this_image in new_item as typ
        end tell
    end tell
end rescale_and_save