Hi
I'm new to this
I have a FlowField with Lookup that returns multiple values
how do i concatenate the returned multiple values in a single comma separated string to display on the item card
Thanks
Nik
Display multiple values from flowfiled as concatenated string on page
C/AL; Flowfields; Flowfilter
0
Comments
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community
I just was not sure how to go about this, I do not want the user to drill down to see the records, I already have that functionality.
I want the user to just see a string of all records in format "1, 2, 3"
Eventually I want the 1 and 2 and 3 to be links to external pdf documents on which the user can click from the Item card.
I'm so new to this that i know what i can and want to do but just not to sure where and how.If you can recommend literature to read or point me to some examples on this I would appreciate it.
So i did some reading
and
Created variable for the recordset and for the string on the item card page
and did this code in the OnAfterGetRecord()
is this the right way to do this? is this the right trigger to use? will this create huge performance issue? is there a better way to do this?
should i put this into a global function so i can call it from other places (like "Item List" or on other pages like fact boxes...)
Thanks for your help, this is only my second day working in NAV.
Your work around is ok. It's better to avoid coding in "OnAfterGetRecord" trigger, but there are some unavoidable situations. Anyway, as it's on the "Card" page, there won't be any performance issue (because card page reads only one record at a time.). As it's only a few lines of code, it's ok to be inline than creating a global function.
BR,
MMV
The BEST option is to figure out a way to make this look/feel like it belongs in NAV, and such a string is NOT it. If they really insist on having the string there, I would create a function in the Item card that returns the string, and set a textbox on the form to this function.
Let's link this to the same discussion on DUG: http://dynamicsuser.net/forums/t/66522.aspx
RIS Plus, LLC
thanks.
we chose nav because of its flexibility to allow modifications, It is very important for our business for such information to be available right away.
this is just one of several that we need to display this way. I will have at least 4-5 more that will use the same logic
Thanks i already have the filed and sounds logical to use it in that way so it does not create unnecessary calls to the function.
The issue that I have with that is that it feels chaotic, not intuitive. This particular one looks like this, another one will look slightly different, and none of it looks like it belongs in NAV, so users will have to be trained on every individual modification. I'd have a count or a sum lookup flowfield that would show as a hyperlink on the page and when you click that it automatically pops up a drilldown page, without writing any code. From a development standpoint this is an easy change that you only do in the table, and it is inherited on all pages that use the table. Users already know about flowfields, they already know they can drill down, they already know what should happen. Add one to a page and they will recognize it immediately and know intuitively how to use it.
Also, you probably programmed this on the page. This means that for the next page for the table, you will have to do the same programming there. Now you have issues with maintenance, what happens when you have to make a change to one of them, will you remember to also update the other pages? Also, you are limited by the maximum length of the string. Have enough catalog pages over time and at some point the string will be too long to display like that. The problem with that is that the compiler will not warn you about that, you will know about it when the user gets an datatype overflow runtime error message.
For me it pays to design it like it belongs in NAV, I'll always push for that. In the end I feel strongly you will have the best user acceptance, and maximum efficiency using the program. You're right though, you paid for the ability to modify it however you see fit.
RIS Plus, LLC