Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Validate function parameter on range

Hi,

I have

[DataSource.Kind="Test", Publish="Test.Publish"]
shared Test.Contents = Value.ReplaceType(TestImpl, TestType);

TestType = type function (
duration as (type number meta [
DataSource.Path = false,
Type = "Singleton",
MakeResourcePath = () => "TestConnector",
ParseResourcePath = (resource) => { },
Documentation.FieldCaption = "Lookback duration",
Documentation.AllowedValues = { 1..30 },
Documentation.SampleValues = {"25"},
Documentation.FieldDescription = "Defines how many days starting from today the connector will look back in time. It can be maximum 30 days"
]),
environment as (type text meta [
Documentation.FieldCaption = "Environment",
Documentation.AllowedValues = { "Test", "Dev", "Prod" },
Documentation.FieldDescription = "Defines which environment data, do you want access"
]))
as table meta [
// appears in the initial datasource parameter configuration dialog
Documentation.Name = "Test"
];

TestImpl = (DurationValue as number, Environment as text) =>
let

......

 

Is it possible show to user message if value of duration not from 1 to 30...I dont want Documentation.AllowedValues = { 1..30 }, dropdown...I want it be text field. @artemus 

1 ACCEPTED SOLUTION
artemus
Employee
Employee

No, the most you can do is use Documentation.FieldDescription and Documentation.FieldCaption, and then fail in the TestConnection.

View solution in original post

1 REPLY 1
artemus
Employee
Employee

No, the most you can do is use Documentation.FieldDescription and Documentation.FieldCaption, and then fail in the TestConnection.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors