sharepoint online – Power Automate – Select single item from Get Items

Here are the steps that I would follow:

  1. After (Get Items) action add a (Compose) action
  2. Execute the Flow and examine the output from the (Compose).
  3. Copy the output of the (Compose) into clipboard
  4. Add (Parse JSON) action and use the output from step 3 as sample data to generate schema
  5. Add addition actions like another (Compose) action to verify the Parse Data.
    Properties should be available from the Dynamic content.

To get a particular item’s property, you can use the expression shown below.
Here (0) indicates the first item in the (Parse JSON) output, which is an array, and (‘LastName’) is a list column (property).

body('Parse_JSON')?(0)('LastName')

enter image description here

Here is an article
describing how to work with JSON in Flow

multi selection – What is the best way to present a question where user has to select multiple options?

I am working on a mobile app where, user has to select few categories and subcategories to proceed. eg: Let’s assume I have four categories A,B,C & D. All these four categories have subcategories which are 10-20 in numbers.

  • My goal here is to create question papers for primary school kids. The app is for the parents. Let’s say subjects are the primary categories. Subcategories include which chapters to include in the test.

  • There are four subjects and each subjects have 10-15 chapters.

  • He/She can select more than one category/subcategories.

  • User will see a summary screen of the items selected.

He/She can select more than one category/subcategories.
User will see a summary screen of the items selected.

multi selection – A 2 step select

I would like to share with you my case study.

My user has to select one or more main categories for legal stuff. After this first choice, he has to select a subcategory of each main category and an amount.

I have imagined something like thaht, with the possibility to delete de selected category, whici will return in the main list.

enter image description here

I will be happy to have some feedbacks.

Thanks and Enjoy.

G.

Outlook.com: when I select the “Other” message tab, the site crashes

In Outlook.com, when I move from “Focused” to “Other” message tab, I get a white screen with the message:

Something Went Wrong
 
There was something that went wrong with the application. Please refresh your browser window to continue.

There is also a Refresh Window button on the right bottom, but the refresh leaves the screen as is. I can only navigate back to outlook.com which restores the “Focused” selection.

  1. I experienced this with both Firefox and Chromium under Linux and with Edge under Windows 10.
  2. I have more than one account and the problem affects only one of them.
  3. I tried to set the same settings on the different accounts. I noticed that in the affected account there is no OneNote button on the top bar, near the account logo.
  4. If in the Settings I disable message sorting into Focused and Other, the entire website crashes with the message above and the only way I found to restore it is to navigate to outlook.com/calendar and use the calendar Settings button to restore the Focused/Other sorting.

Order By Multi Select Choice List on SharePoint Views

Unfortunately, we cannot sort the multichoice columns. Some workarounds:

Workaround

For each choice, create a new “Yes/No” column. For example, if you have Red, Green, Blue choices, then create new three columns:

  • Name: Red, Type: Yes/No
  • Name: Green, Type: Yes/No
  • Name: Blue, Type: Yes/No

Then you can sort and filter by individual columns you have create.

google sheets – How to select a random non-blank row?

Let’s assume two sheets.

One sheet “data” has filled rows in the range A:C.

Another sheet called “return” should display a random row from “data”.

Therefore my question, anyone knows an elegant solution (preferably without using a script) to select a random row that contains data (i.e. non-blank) from the range A:C on the “data” sheet and display it on the “return” sheet?

adminhtml – Email template get category content tab form select drop down attribute in Magento 2.3.1

All Email template get category content tab form select drop down attribute in Magento 2.3.1

app/code/Vendor/Module/Setup/InstallData.php

$eavSetup->addAttribute(MagentoCatalogModelCategory::ENTITY, 'form_select', (
        'type'         => 'int',
        'label'        => 'Form Select',
        'input'        => 'select',
        'sort_order'   => 130,
        'source'       => Template::class,
        'global'       => ScopedAttributeInterface::SCOPE_STORE,
        'visible'      => true,
        'required'     => false,
        'user_defined' => false,
        'default'      => '1',
        'group'        => 'Content',
    ));

app/code/Vendor/Module/view/adminhtml/ui_component/category_form.xml

<field name="form_select">
        <argument name="data" xsi:type="array">
            <item name="options" xsi:type="object">VendorModuleModelSourceTemplate</item>
            <item name="config" xsi:type="array">
                <item name="required" xsi:type="boolean">false</item>
                <item name="validation" xsi:type="array">
                    <item name="required-entry" xsi:type="boolean">false</item>
                </item>
                <item name="sortOrder" xsi:type="number">90</item>
                <item name="dataType" xsi:type="string">string</item>
                <item name="formElement" xsi:type="string">select</item>
                <item name="label" translate="true" xsi:type="string">Form Select</item>
            </item>
        </argument>
    </field>

enter image description here

typescript – Cómo cubrir lista de valores en select Angular 8

He estado mirando este tutorial: https://www.javatpoint.com/angular-spring-crud-example,
pero no he encontrado forma de cubrir valores select al realizar una petición de una API REST.

Os comparto los siguientes códigos fuente:

add-employee.component.html

   <div class="form-group">
          <label for="department">{{'employeeDepartment' | translate }}</label>
          <select class="form-control" formControlName="employee_department" data-toggle="tooltip"
                  data-placement="right" title="{{'employeeDepartment' | translate }}">
            <option value="null">{{'SelectDepartment' | translate }}</option>
            <option value="B-Tech">B-Tech</option>
            <option value="BCA">BCA</option>
            <option value="MCA">MCA</option>
            <option value="M-Tech">M-Tech</option>
          </select>
          <span *ngIf=" employeeDepartment.errors.required">{{'ErrorEmployeeDepartment' | translate }}</span>
        </div>

        <div class="form-group">
          <label for="location">{{'employeeLocation' | translate }}</label>
          <select class="form-control" formControlName="employee_location" data-toggle="tooltip"
                  data-placement="right" title="{{'employeeLocation' | translate }}">
            <option value="null">{{'SelectLocation' | translate }}</option>
            <option value="B-Tech">B-Tech</option>
            <option value="BCA">BCA</option>
            <option value="MCA">MCA</option>
            <option value="M-Tech">M-Tech</option>
          </select>
          <span *ngIf=" employeeDepartment.errors.required">{{'ErrorEmployeeLocation' | translate }}</span>
        </div>

add-employee.component.ts

import { Component, OnInit } from "@angular/core";
import {HttpClientService, Employee, Department, Location, ItemSet, Item} from '../service/httpclient.service';
import { Router } from '@angular/router';
import {FormControl,FormGroup,Validators} from '@angular/forms';

@Component({
  selector: "app-add-employee",
  templateUrl: "./add-employee.component.html",
  styleUrls: ("./add-employee.component.css")
})
export class AddEmployeeComponent implements OnInit {
  employee: Employee = new Employee();
  showSpinner: any;

  constructor(private httpClientService: HttpClientService,
    private router: Router) {}

  employee: Employee = new Employee();
  submitted = false;

  ngOnInit() {
    this.submitted = false;
  }

  employeesaveform = new FormGroup({
    employee_name:new FormControl('' , (Validators.required , Validators.minLength(10) ) ),
    employee_last:new FormControl('' , (Validators.required , Validators.minLength(10) ) ),
    employee_nif:new FormControl('' , (Validators.required , Validators.minLength(9) ) ),
    employee_department: new FormControl('' , Validators.required),
    employee_location: new FormControl('' , Validators.required),
    employee_chief: new FormControl(),
    employee_itemset: new FormControl(),
    employee_item: new FormControl(),
    employee_registerdate: new FormControl(),
    employee_shutdate: new FormControl()
  });

  saveEmployee(saveEmployee){
    this.employee = new Employee();
    this.employee.employeeName = this.employeeName.value;
    this.employee.employeeLastNames = this.employeeLastNames.value;
    this.employee.employeeNIF = this.employeeNIF.value;
    this.employee.department.departmentId = this.employeeDepartment.value;
    this.employee.location.locationId = this.employeeLocation.value;
    this.employee.employeeChief.employeeId = this.employeeChief.value;
    this.employee.itemSet.itemSetId = this.employeeItemSet.value;
    this.employee.item.itemId = this.employeeItem.value;
    this.employee.employeeRegisterDate = this.employeeRegisterDate.value;
    this.employee.employeeShutDate = this.employeeShutDate.value;

    this.submitted = true;
    this.createEmployee();
  }

  get employeeName(){
    return this.employeesaveform.get('employee_name');
  }

  get employeeLastNames(){
    return this.employeesaveform.get('employee_last');
  }

  get employeeNIF(){
    return this.employeesaveform.get('employee_nif');
  }

  get employeeDepartment(){
    return this.employeesaveform.get('employee_department');
  }

  get employeeLocation(){
    return this.employeesaveform.get('employee_location');
  }

  get employeeChief(){
    return this.employeesaveform.get('employee_chief');
  }

  get employeeItemSet(){
    return this.employeesaveform.get('employee_itemset');
  }

  get employeeItem(){
    return this.employeesaveform.get('employee_item');
  }

  get employeeRegisterDate(){
    return this.employeesaveform.get('employee_registerdate');
  }

  get employeeShutDate(){
    return this.employeesaveform.get('employee_shutdate');
  }


  addEmployeeForm(){
    this.submitted=false;
    this.employeesaveform.reset();
  }

  createEmployee(): void {
    console.debug(this.employee);
    this.httpClientService.createEmployee(this.employee).subscribe(data => {
      alert("Employee created successfully.");
      this.router.navigate((''))
    });
  }
}

httpclient.service.ts

import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';

export class Department {
  constructor(
    public departmentId: string,
    public departmentName: string,
    public headquarters: Headquarters
  ) {}
}

export class Location {
    public locationId: number;
    public department: Department;
    public locationAbbreviation: string;
    public locationDescription: string;
}

@Injectable({
  providedIn: 'root'
})
export class HttpClientService {
  constructor(private httpClient: HttpClient) {}

  getDepartments() {
    return this.httpClient.get<Department()>('http://localhost:9898/xxxxxx/v1/departmentmanage/departments');
  }

  public deleteDepartment(department) {
    return this.httpClient.delete<Department>(
      'http://localhost:9898/xxxxxx/v1/departmentmanage/department' + "https://es.stackoverflow.com/" + department.departmentId
    );
  }

  public createDepartment(department) {
    return this.httpClient.post<Department>(
      'http://localhost:9898/xxxxxx/v1/departmentmanage/department',
      department
    );
  }

  public updateDepartment(department) {
    return this.httpClient.put<Department>(
      'http://localhost:9898/xxxxxx/v1/departmentmanage/departments' + "https://es.stackoverflow.com/" + department.departmentId,
      department
    );
  }

  getLocations() {
    return this.httpClient.get<Location()>('http://localhost:9898/xxxxxx/v1/locationmanage/locations');
  }

  public deleteLocation(location) {
    return this.httpClient.delete<Location>(
      'http://localhost:9898/xxxxxx/v1/locationmanage/location' + "https://es.stackoverflow.com/" + location.locationId
    );
  }

  public createLocation(location) {
    return this.httpClient.post<Location>(
      'http://localhost:9898/xxxxxx/v1/locationmanage/location',
      location
    );
  }

  public updateLocation(location) {
    return this.httpClient.put<Location>(
      'http://localhost:9898/xxxxxx/v1/locationmanage/locations' + "https://es.stackoverflow.com/" + location.locationId,
      location
    );
  }

Otras preguntas similares: https://stackoverflow.com/questions/43042481/angular2-how-to-get-data-using-query-params-from-dropdown-selection, https://stackoverflow.com/questions/27982320/fill-select-element-using-angular-based-on-query-string-parameter, https://stackoverflow.com/questions/38950494/how-to-show-table-information-with-select-option-in-angular

El objetivo es que en el formulario de añadir salga un despegable con todos los valores extraídos del GET, para así cubrir las FKs obligatorias de la BD de MySQL.

Alguna solución, tanto para HTML como para el archivo ts, por favor?

Muchas gracias! 🙂

routing – How to select “best” journey in McRaptor?

What are the good, well-known strategies to select the “best” journey in multi-criteria raptor by calculating its score? I came up with the solution like this:

journeyScore = (j.arrivalTime – minArrivalTime) * arrivalScore + (j.walkingTime – minWalkingTime) * walkingCoef + (j.transportLegsCount- minTransportLegsCount) * transportLegsCoef

But what are the “optimal” coefficient values or other good strategies?

google sheets – Using regex to select the text between two characters IF there is text

I have this text:

<a class="_f5rco33" href="/account-settings"><div class="_ojs7nk">Account</div></a>

And I want to grab the word “Account”, but when I use this regex

">((^<)*)<"

It returns “” because “settings”><div” is the first valid instance.

My tags and text will change every time I run this, but I want to select what’s between > and <, IF it is text, and I can’t figure it out.