Skip to content

Commit

Permalink
Chore/set up publishing (#21)
Browse files Browse the repository at this point in the history
* Updated Solution.cdsproj
* Updated README.md
* Added images
* Created CHANGELOG.md

---------

Co-authored-by: Hovhannes Dilanyan <[email protected]>
  • Loading branch information
Hovhannes-Dilanyan and Hovhannes Dilanyan authored Apr 20, 2023
1 parent 0a4c9e8 commit a16d20a
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ jobs:
# control-thumbnail-url: '' # default
# control-primary-image-url: '' # default
# control-youtube-video-url: '' # default
# control-tags: Bever-Controls, PCF, <control-title> # added by default
# control-tags: Field, Grid, FetchXml
# create-new-release: true # default
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## [v1.0.0](https://github.com/BeverCRM/PCF-FetchToSubgrid/releases/tag/v1.0.0) (2023-04-20)

This control converts a FetchXml string into a subgrid.
Binary file added MarketplaceAssets/images/primary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MarketplaceAssets/images/thumbnail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,52 @@
# Fetch to Subgrid

This control converts a _"Multiple Lines of Text"_ field into a subgrid.

<br>

![image](https://user-images.githubusercontent.com/60586462/233377327-4e43c785-96fa-4845-8308-d523ce457f58.png)

<br>

The _"Multiple Lines of Text"_ field value can contain either a FetchXml string or a JSON string with the following format:

```json
{
"newButtonVisibility": true,
"deleteButtonVisibility": true,
"pageSize": 10,
"fetchXml": "<fetch version=\"1.0\" output-format=\"xml-platform\" mapping=\"logical\" distinct=\"false\">\n <entity name=\"bvr_testcase\">\n <attribute name=\"bvr_name\" />\n <attribute name=\"bvr_slot_title\" />\n <attribute name=\"bvr_os_status\" />\n <attribute name=\"createdon\" />\n <attribute name=\"statuscode\" />\n <attribute name=\"statecode\" />\n <attribute name=\"ownerid\" />\n <filter type=\"and\">\n <condition attribute=\"bvr_os_status\" operator=\"eq\" value=\"551800000\" />\n </filter>\n </entity>\n</fetch>"
}
```

<br>

| Property | Description |
| ------------- | ------------- |
| fetchXml | FetchXml query, according to which the data will be shown in the sub-grid. |
| pageSize | Number of sub-grid lines per page. |
| newButtonVisibility | Show or hide _New_ button on the sub-grid. |
| deleteButtonVisibility | Show or hide _Delete_ button on the sub-grid. |

<br>

Control has the following properties:

| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| Default FetchXml | String | Required | The default FetchXml value will be used if the _"Multiple Lines of Text"_ field value doesn't contain the _"fetchXml"_ JSON property. |
| Default Page Size | Number | Required | The default Page Size value will be used if the _"Multiple Lines of Text"_ field value doesn't contain the _"pageSize"_ JSON property. |
| New Button Visibility | Boolean | Required | The default New Button Visibility will be used if the _"Multiple Lines of Text"_ field value doesn't contain the _"newButtonVisibility"_ JSON property. |
| Delete Button Visibility | Boolean | Required | The default Delete Button Visibility will be used if the _"Multiple Lines of Text"_ field value doesn't contain the _"deleteButtonVisibility"_ JSON property. |

<br>

![image](https://user-images.githubusercontent.com/60586462/233362848-3acb9a0f-9478-4e54-8763-c84b98e93aa9.png)

<br>

FetchXml can contain:
* FetchXML aggregate columns
* Multiple link entities
* Attributes of the fetch tag
* etc.
4 changes: 0 additions & 4 deletions Solution/Solution.cdsproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\FetchToSubgrid.pcfproj" />
</ItemGroup>

<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
<Import Project="$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Solution.targets" Condition="Exists('$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Solution.targets')" />
Expand Down

0 comments on commit a16d20a

Please sign in to comment.