-
Notifications
You must be signed in to change notification settings - Fork 767
Draft: [WTF-2288]: Documentation update for page parameters #10472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Draft: [WTF-2288]: Documentation update for page parameters #10472
Conversation
|
|
||
| ## Introduction | ||
|
|
||
| Parameters are the means by which you pass data to your logic. When a page is loaded, the parameters are filled with the current values. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here it still says "logic", should be page I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not really happy with the introduction. I will cook a bit longer on an alternative.
|
|
||
| ## Common Section | ||
|
|
||
| The **Documentation** property can be used to store developer documentation. This can be used to explain to other developers about the parameter. End-users will never see this documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have documentation for page parameter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ (I can't resolve this thread)
|
|
||
| ### Data Type | ||
|
|
||
| The data type of a parameter defines the type of the value that it expects. See [Data Types](/refguide/data-types/) for the possible data types. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we do not support all datatypes for page parameters. Readers can still refer to the linked page for more information, but we should enumerate which are supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ (I can't resolve this thread)
|
|
||
| ### Argument {#argument} | ||
|
|
||
| Determines whether the argument is optional or required. When the argument is set to be **Optional**, it can be omitted when opening the page. When the argument is set to be **Required**, an argument must be passed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is important to stay consistent with terminology here. The page has a parameter, which can be made required or optional. If it is required it is mandatory to supply an argument for that parameter when opening a page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps:
Determines whether it is required or optional to pass an argument to the parameter when opening the page.
|
|
||
| #### Default Value | ||
|
|
||
| When an argument is set to **optional**, a default value can be set: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am missing an explanation on what the default value does and when it is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The text now states: "if the parameter is omitted by the user..." but the user has no choice in this. I would rewrite the sentence to:
Given the example below, if no argument is passed for
CustomerName, the page will open with the parameter set to''.
| @@ -0,0 +1,58 @@ | |||
| --- | |||
| title: "Parameter" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering the sibling page "Page Properties" and the other "Parameters" page, I would rename this to "Page Parameters"
|
|
||
| The page has a parameter, which can be made required or optional. If it is required it is mandatory to supply an argument for that parameter when opening a page. | ||
|
|
||
| #### Default Value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section is indented one level too deep.
|
|
||
| {{< figure src="/attachments/refguide/modeling/pages/page/page-parameter.png" class="no-border" >}} | ||
|
|
||
| ## Output Section |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section title does not make sense. Maybe "Properties" or "Options" makes more sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would "Mappings" make more sense? I see we use the term, in other sections like "Import Mappings".
| {{< figure src="/attachments/refguide/modeling/pages/page/page-parameter-default-value.png" max-width=70% >}} | ||
|
|
||
| {{% alert color="info" %}} | ||
| The default value is used when the argument is omitted, not when the argument value is `empty`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might make sense to make it clear what app-lifetimes we are talking about. But I am not sure if it is clear.
The default value is used when the argument is omitted during modeling. Not when the argument value is
emptyduring runtime.
| The default value is used when the argument is omitted, not when the argument value is `empty`. | ||
| {{% /alert %}} | ||
|
|
||
| ## Passing Arguments from a caller |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just "Passing Arguments" is sufficient
|
|
||
| ## Passing Arguments from a caller | ||
|
|
||
| When using an **Show page** action form a microflow, nanoflow or button, you can pass arguments in two primary ways, depending on the data type of the argument. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arguments are passed to page parameters when a page is opened. For example, using a Show page action on a widget event or in a microflow. For each parameter the page has an argument can be configured. It is only necessary to pass arguments to required parameters.
|
|
||
| ## Introduction | ||
|
|
||
| Parameters are the means by which you pass data to your logic. When a page is loaded, the parameters are filled with the current values. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not really happy with the introduction. I will cook a bit longer on an alternative.
|
|
||
| ### Variable Arguments | ||
|
|
||
| Variable arguments are used to pass parameters from the context to the page. This is done by selecting the desired `arguments` from the dropdown. **Optional** can be omitted by selecting `(None)` . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Variable arguments are used to pass parameters from the context to the page. This is done by selecting the desired `arguments` from the dropdown. **Optional** can be omitted by selecting `(None)` . | |
| Variable arguments are used to pass parameters from the context to the page. This is done by selecting from the available variables on the page presented in the dropdown. **Optional** parameters don't require an argument and can be omitted by selecting `(None)` . |
|
|
||
| {{< figure src="/attachments/refguide/modeling/pages/page/page-parameter-argument-variable.png" max-width=70% >}} | ||
|
|
||
| ### Expression-Based Arguments (All Data Types) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ### Expression-Based Arguments (All Data Types) | |
| ### Expression-Based Arguments |
|
|
||
| ### Expression-Based Arguments (All Data Types) | ||
|
|
||
| Primitive values, such as strings, booleans, and enumerations, can be passed as expressions. This method allows users to use functions and follow associations within the expression to set the argument values. Using expressions for arguments provides flexibility in setting values and improves the functionality of pages. In the example below, the page has an parameter **AnimalName** which is populated by the **Name** member of the provided **Animal** object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would also be possible to pass an object using an expression. But I would need to try to be sure.
8fff48e to
0930f54
Compare
The documentation for optional and primitive page parameters which is introduced at 11.6