Git Product home page Git Product logo

pcf-controls's Introduction

PCF-Controls

Controls using PowerApps Components Framework

NN Checkboxes

Custom Switch

Date as checkbox

Simple Notification

Action Button

Linear Slider with steps

NN Checkboxes

Download

Purpose

The purpose of this control is to allow user to associate/disassociate records for a many-to-many relationship displaying all possible records as checkboxes or toggle switches

Vidéo

Samples

Checkboxes Switches
No color / Not grouped Sample2 Sample1
Records Color / Not grouped Sample5 Sample6
No color / Grouped Sample3 Sample9
Records color / Grouped Sample4 Sample7
Group color / Grouped Sample10 Sample8

Configuration

This is the list of parameters that can be set on the control

Parameter Description Required Bound to an attribute
Display attribute Attribute to use as label for the checkbox X X
Relationship schema name Schema name of the relationship. required only if multiple many-to-many relationship exist for both related entities ?
Background color Attribute to use as background color X
Color Attribute to use as forecolor X
Columns Number of columns to display checkboxes X
Grouping Attribute Attribute used to group records. If used, this attribute must be the first attribute used to sort the view used by this control X
Layout Choose the layout for the rendering X
Switch Off color Default background color when the switch is Off. This parameter is overriden by the parameter Background color X
Switch On color Default background color when the switch is On. This parameter is overriden by the parameter Background color X
Allow to select a category Indicates if links must be added for each category to select/unselect all records X

Custom Switch

Download

Purpose

The purpose of this control is to allow user to add switch for Two Options attribute and apply the color and shape they want to fit with the color of the company.

Samples

Screenshot

Configuration

This is the list of parameters that can be set on the control

Parameter Description Required Bound to an attribute
Attribute The attribute to display as a switch X X
Off color Color used for the switch background when the value is Off
On color Color used for the switch background when the value is On
Switch color Color used for the switch
Layout Square or Round X
Display label Indicates if selected option label must be displayed next to the switch

Date as checkbox

Purpose

As mentioned by MVP Gus Gonzalez in this 2 minutes Tuesday video, Two Options attribute could be replaced with Datetime attribute for some business needs. This PCF allows to transform a date time attribute in custom switch to keep the behavior of a checkbox while storing value as the current date time.

Samples

Screenshot

Configuration

See documentation of Custom Switch. This is the same.

Simple Notification

Purpose

Allows to display a notification or an helpful message to the user in a section. This should avoid to create static web resource to display information.

Samples

Screenshot

Configuration

Parameter Description Required Bound to an attribute
Attribute The attribute to use to display the control X X
Notification type Type of notification X
Message Message to display X
Display a link? Indicates if an hypertext link must be added at the end of the message
Link text Text to be used for the link
Link Url to navigate to when clicking on the link

Action Button

Purpose

Allows to display a button to perform an action. To allow developer to do anything they want from the form, this button simply copies the text of the action button on the bound string attribute. The developer needs to add an onChange event to this string attribute, check for the value of the attribute (should be the text of the action button) and perform the action needed.

Samples

Screenshot

Sample script to be implemented to execute an action when the button is clicked

function onChange(context){
  let attribute = context.getEventSource();
  let value = attribute.getValue();
  if(value === "Run this!"){
    Xrm.Navigation.openAlertDialog({text: "Action button has been triggered!"});
  }
  // Clear the value and avoid to submit data
  attribute.setValue(null);
  attribute.setSubmitMode("never");
}

Configuration

Parameter Description Required Bound to an attribute Additional info
Attribute The attribute to use to display the control X X
ActionText Text of the action button X Can be a static string or a json object with language id like {"1033":"Run this!","1036":"Exécute ça!"}

Linear Slider with steps

Purpose

Displays a linear slider that can be configured to allow only specific step. This control can also be configured to change the color of the slider, specify minimum and maximum values, and add text before and/or after the selected value. This control is an adaptation of the TSLinearInputControl sample from Microsoft

Samples

Slider with blue color, minimum 0, maximum 100, step by 5, prefix "Percentage: " and suffix " %"

image

Configuration

Parameter Description Required Bound to an attribute Additional info
Attribute The attribute to use to display the control X X
Minimum Minimum value for the slider control X
Maximum Maximum value for the slider control X
Step Step for the slider control X
Color Color of the slider
Label prefix Define a text to be inserted before the value of the column
Label suffix Define a text to be added after the value of the column
Label position Position of the label under the slider X Left, Center or Right

pcf-controls's People

Contributors

dependabot[bot] avatar dynamicsninja avatar mscrmtools avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.