Category: Have Code

Pexels Pixabay 209224 0

Convert numbers to words currency (pt-pt, pt-br, en-us) the confusion!!

This is a know issue for converting numbers to words (Currency). There is some confusion in this concept, because not all countries use the same standard. Portugal uses the same nomenclature as most European countries, such as Spain, Italy, France, England, Germany, etc. But for example, the United States and Brazil use another form to designate numbers, which sometimes generates...

Pexels Sora Shimazaki 5926380 0

Consume Lookup Multi Select Fields SPFx with Models and Hooks

First when you set up lookup columns in a list or library, Microsoft restricts you to 12 columns of that type in a single view. The reason behind this limitation is that lookup columns retrieve data from another list or source. If you surpass this limit and try to add a 13th column, you’ll encounter an error message. It seems that 13 isn’t a...

Pexels Andrea Piacquadio 3822850 0

SPFx IPropertyPaneDropdownOption[] get Unique Options (Duplicates) Cascade

When designing the property pane for your SharePoint client-side web parts, you may have one web part property that displays its options based on the value selected in another property. This scenario typically occurs when implementing cascading dropdown controls. I’m assuming in this Article/Fix you are getting all lists excluding the hidden ones. Let’s Start from the beginning, you have...

Pexels Andrea Piacquadio 3822850 0

PnPJs SPFx orderBy() not working?

In the PnPJs Agnostic Framework Some fields are not sortable, let’s assume this call is using a MODEL where TrainingAreaPosition is a number column without decimal places: I’m using a Custom React Hook, fix by comparing the field name, where Position is a property of the Model to Map

Pexels Andrea Piacquadio 3822850 0

Using SPFx React Controls Context in version 1.17.3

Since React 17 was introduced in version 1.16.0, the problems has began with some PnP Projects. In version 1.17.3 you will get this error when installing the PnP React Controls, so you must wait for the Repo be updated. In version 1.16.1 to use the PeoplePicker Control the workaround was give context as any in your Webpart.ts Now if you...

Pexels Christina Morillo 1181263 0

Working with Models in SPFx and Consume Some Field Types

This article will give you some insights to work with models in the SharePoint Framework SPFx and consume information from some Field Types FIELDS Why to use Models? TypeScript is a superset of JavaScript that adds optional static typing and other features to JavaScript. It provides a way to catch errors early through static type checking and can help you...

Pexels Pixabay 270348 0

Building a Timeline Component with the SPFx SharePoint Framework

Let’s get you a Timeline component you can use for several use cases, in a chronologic way to represent information or just another way you want to represent items from a SharePoint List that makes sense to you. I’m using in this sample Class Components because at the time of this post there is no native Functional Components in the...