diff --git a/datapress/knowledge_base/devInfo/retrieve.md b/datapress/knowledge_base/devInfo/retrieve.md index 536d41f..0bf3146 100644 --- a/datapress/knowledge_base/devInfo/retrieve.md +++ b/datapress/knowledge_base/devInfo/retrieve.md @@ -33,26 +33,6 @@ skipToken:null ``` -**entity**: This specifies the name of the entity from which records are being retrieved. In this case, the entity is contact. - -**select**: A list of the fields to be returned for each record. Here, the columns specified are fullname and ownerid. - -**filter**: This parameter is used to filter the records based on specified value. - -**order**: Specifies the ordering of the returned records. The key is the column logical name and the value is the sort direction. - -**expand**: Used to include related entities or additional data from related entities in the results. This parameter can help fetch detailed information from linked entities. Other examples: -- parentcustomerid_account($select=name,telephone1,accountid) -- transactioncurrencyid($select=isocurrencycode). - -**top**: Limits the number of records returned. Here, it is set to 2, meaning only the top 2 records will be returned. - -**includeCount**: This should be a boolean value. If set to true, the total record count can be retrieved using `{{ records.TotalRecordCount }}`. In this example, it is set to null, meaning the count is not included. - -**skip**: Specifies the records to skip. It is set to null here, meaning no records are skipped. - -**skipToken**: Used for pagination. When set to null, it indicates there is no token used for skipping records. - Here is an example of how to retrieve a single record: ```twig diff --git a/datapress/using-twig/filters_and_function.md b/datapress/using-twig/filters_and_function.md index 27835f4..a97571f 100644 --- a/datapress/using-twig/filters_and_function.md +++ b/datapress/using-twig/filters_and_function.md @@ -21,6 +21,10 @@ DataPress (Dataverse Integration) provides several Dataverse-specific and genera ## Functions +### image_url + +- `image_url()` - returns URL to the image stored in the specified Dataverse image column. + ```twig - image_url( record, @@ -33,7 +37,10 @@ DataPress (Dataverse Integration) provides several Dataverse-specific and genera } ) ``` --- returns URL to the image stored in the specified Dataverse image column. + +### file_url + +- `file_url()` - returns download URL for the file stored in the specified Dataverse file column. ```twig - file_url( @@ -46,8 +53,58 @@ DataPress (Dataverse Integration) provides several Dataverse-specific and genera } ) ``` --- returns download URL for the file stored in the specified Dataverse file column. + +### last_error - `last_error()` - returns last error generated by the Twig provider. +### entity_url + - `entity_url( record, postId = null )` -- returns URL to the website page with the given entity record bound to it. Uses [Table Binding](/datapress/binding/table-binding.md) feature. If more than one WordPress post is bound to the table, you can pass post ID to link to a different page instead. + +### retrieve_multiple + +- `retrieve_multiple()` - retrieve Dataverse records using Web API twig functions + +**Parameters:** + +**entity**: This specifies the name of the entity from which records are being retrieved. In this case, the entity is contact. + +**select**: A list of the fields to be returned for each record. Here, the columns specified are fullname and ownerid. + +**filter**: This parameter is used to filter the records based on specified value. + +**order**: Specifies the ordering of the returned records. The key is the column logical name and the value is the sort direction. + +**expand**: Used to include related entities or additional data from related entities in the results. This parameter can help fetch detailed information from linked entities. Other examples: +- parentcustomerid_account($select=name,telephone1,accountid) +- transactioncurrencyid($select=isocurrencycode). + +**top**: Limits the number of records returned. Here, it is set to 2, meaning only the top 2 records will be returned. + +**includeCount**: This should be a boolean value. If set to true, the total record count can be retrieved using `{{ records.TotalRecordCount }}`. In this example, it is set to null, meaning the count is not included. + +**skip**: Specifies the records to skip. It is set to null here, meaning no records are skipped. + +**skipToken**: Used for pagination. When set to null, it indicates there is no token used for skipping records. + +### retrieve + +- `retrieve()` - retrieve a single Dataverse record using Web API twig functions + +**Parameters:** + +**entity**: This specifies the name of the entity from which records are being retrieved. + +**select**: A list of the fields to be returned for a record. + +**guid**: This parameter is used to filter the record by id. + +**expand**: Used to include related entities or additional data from related entities in the results. This parameter can help fetch detailed information from linked entities. Other examples: +- parentcustomerid_account($select=name,telephone1,accountid) +- transactioncurrencyid($select=isocurrencycode). + +:::tip + +[Examples of using **retrieve()** and **retrieve_multiple()**](/knowledge-base/retrieve-records) +::: \ No newline at end of file