- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2022 02:46 AM
hello.
I am adding a String type option called "URL" to the SP widget's option schema.
I want to use the value of the option added next in the client controller, but I don't know how to get it.
I would like to know how to use the value entered in the option in the client controller.
"Option Schema"
[{"name":"url","section":"Presentation","label":"URL","type":"String"}]
Regards,
Ro
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2022 03:16 AM
Update the option schema option schema as below: (s letter in String should be a small letter)
[{"name":"url","section":"Presentation","label":"URL","type":"string"}]
In the server side define as variable as below:
data.optionUrl = options.url;
In client side use the above defined variable:
console.log(c.data.optionUrl);
Output:
Please mark as correct answer if this solves your issue
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2022 03:16 AM
Update the option schema option schema as below: (s letter in String should be a small letter)
[{"name":"url","section":"Presentation","label":"URL","type":"string"}]
In the server side define as variable as below:
data.optionUrl = options.url;
In client side use the above defined variable:
console.log(c.data.optionUrl);
Output:
Please mark as correct answer if this solves your issue
ServiceNow Community Rising Star, Class of 2023