- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Hey guys!
I really wonder what I'm doing wrong, as I've followed this Youtube tutorial thoroughly. Watch from 5:27 to understand where my issue starts.
I am trying to show information about specific tasks, but it doesn't matter which card I open up, the task number is always static, giving me this very task number: RB0054179 (no matter what button I click in whatever card).
I always get this same information:
This is the "Bind data to content" information box:
The binded data source is based on a single lookup record type in my case as well.
What do you think I am missing? What could be possible issues?
Greetings!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
You have to first create a client script in the bottom left and then
when you're selecting a handler for an event they are at the bottom of the list.
But you can use the no-code "update client state parameter" instead of client script as long as you are binding to the component property from state
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday - last edited yesterday
I didn't watch the video but you shouldn't necessarily have another data resource to get the record for your modal. You can pass whatever info you need inside your repeater as part of the data array. Meaning if you need number, state whatever you get that in your lookup and pass it to the repeater. That way the nth component inside the repeater can reference the repeater data at index n like you have done.
Then with your button component, you should bind an event handler(s) to the button clicked event. Then you can pass some of the information to the modal with the handler. And whatever else you need in the modal I would store in a client state parameter and bind to the modal contents.
So you would have something like this
Client script "Update state params":
/**
* {params} params
* {api} params.api
* {any} params.event
* {any} params.imports
* {ApiHelpers} params.helpers
*/
function handler({api, event, helpers, imports}) {
api.setState("number", event.context.item.value.number.displayValue)
api.setState("sysid", event.context.item.value.sys_id.displayValue)
}Binding state to modal content property for example:
/**
* {params} params
* {api} params.api
* {TransformApiHelpers} params.helpers
*/
function evaluateProperty({
api,
helpers
}) {
return `${api.state.number} sysid is ${api.state.sysid}`;
}If you instead want to bind from another data resource to the modal properties then you need to also refresh that data resource with the button clicked event.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
6 hours ago
@lauri457 I am trying to work things out with your help. But I cannot find any handler called "Execute - Client Script".
I can only find these handlers: "Execute" and "Update client state parameter".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
You have to first create a client script in the bottom left and then
when you're selecting a handler for an event they are at the bottom of the list.
But you can use the no-code "update client state parameter" instead of client script as long as you are binding to the component property from state
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
@lauri457 OH YES IT WORKS NOW! YOU ARE A HERO.
