- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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
3 weeks ago - last edited 3 weeks ago
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
3 weeks 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 weeks ago
Hi @ronro2 - I would start by looking at the look_up_a_single_record_rail_request data resource. Can you share a screenshot here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hey @Sheldon Swift!
Here is the screenshot you asked for. To me it looks normal. Keep in mind that this is the right table for my use case. 😕
Here is one showing its usage:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@Sheldon Swift When I try to "Bind data to Content" I can here already see the fixed value "RB0054179". Look here:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@Sheldon Swift Maybe there should be a connection between each card and the modal? Because I have a carousel of cards, and there the data is correct. But when I click on the "Åtgärda" button that connection seems to be lost/non existent.