Dynamic link in paging grid

Certified Lead Developer

Hi, I want to display Interface( having fields: id, product, price, quantity, description, cancel-boolean) in one of the column for paging grid from an entity.
I am using example like this, however not getting output.
a!localVariables(
local!Product,
a!linkField(
links: a!dynamicLink(
label: "Product",
value: rule!Online_UI_Product(ri!cancel,ri!product),
saveInto: local!Product
)
)
)

  Discussion posts and replies are publicly visible

  • Firstly, please use the 'Insert Code' option when posting here so that the code appears in a discrete section in your post (makes it easier for anyone to read and/or copy). Yours is trivial this time around but it may get more complex and much larger next time.

    Could you explain what behaviour you're trying to achieve here? Typically a link-field is used to assign one or more links within an other Interface Component, and your code looks very odd in that the link-field appears to be a container whose value you're trying to set to the content of another interface component. If you could explain what your objective is here we might be able to suggest one or more options you could explore.

  • 0
    Certified Lead Developer
    in reply to Stewart Burchell

    Hi  Stewart, thanks for the instant reply and suggestion, I am creating a app like online shopping site, where product list is coming from data base in a grid form, so i want to provide a link to the product name, as whenever the user click on the link, it should dispaly all the product details, which is in another Interface.

  • HI Kashif

    You should then have the link field INSIDE the interface that holds your grid (I presume this is what rule!Online_UI_Product is implementing?) Pick the relevant column of that grid and implement your link on that value.

  • 0
    Certified Lead Developer
    in reply to Mohammed Kashif

    You would probably need to post the code within rule!Online_UI_Product() for us to have any clue what's going on.  If it's very long, then you could trim it down to just the relevant parts (and as Stewart suggested originally, you should definitely use a code box, via Insert --> Insert Code in the comment entry menu here.)

  • 0
    Certified Lead Developer

    Hi Kashif,

    If I understand your requirement correctly, you are trying to have a UI that has 2 columns, In one, you have a paging grid and on another, you are trying to display a UI with dynamic values based on the selection in the grid.
    In such a case, using a dynamic link on the product column in the paging grid is correct, but calling another interface rule in value of dynamic link will not work here.
    Save a value (like ri!product) which defines your selection and using that value, display the UI in the 2nd column.

    Please let me know if you need a sample code to refer to.

    - Regards
    Subha