First, forgive me for my ignorance in UBAQs and Udashboards. I’m learning this stuff as I go.
Here’s what I have going on. I have 2 UD tables that are tied together in a query. One is the list of containers, and the other table is a comments table that is tied to the first with a GUID in key1 to another field. I want to be able to make an updateable dashboard to allow the users to add comments from the dashboard because adding them by typing on the screen of an IPOD touch (the devices they are using on the shop floor) can be a pain.
Making the change part of it is not too hard and I have that working with the help of Jose Gomez. But it can only change a value, and if a comment has not been made yet, there isn’t a row to change in the comments table, and I have to add new.
That brings me to the world of the Column initial expression to create the first row to be able to update and I’m a bit stuck.
First, I need to create a GUID for key 1 on UD05. After some googling… it looks like System.Guid.NewGuid().ToString() comes back with no errors, we’ll see if that works.
Next is the date time. I’m going to try to constant it give me for today (Constants.Today) but I don’t think it’s going to give me the right format (MM/DD/YYY HH:MM AM/PM) but we’ll see what it gets me. I need an actual time in there, and I think it’s going to give me 12:00 am.
The last thing that I need and I don’t know how to get, is the Key 1 from the other table (UD02) that is on the row that I want to add the comment to. That’s how the system knows that this comment on UD05 goes with this container. I was expecting to have some fields to pick from in the Updateable Field Initial Expression, but It doesn’t
Do I have to do this with a customization? Below is a screen shot of the UBAQ. The comments fields are empty because it’s a left join of the UD02 to UD05 table and UD05 doesn’t have rows yet for the containers with no comments.
Any help would be appreciated.
Edit, so I gave what I had a shot to see what I would get.
First, the GUID did not work. The Key is blank, in fact, the only thing that wrote was the text. Hmm, not sure what to do next.
Next edit: It works sort of with the Get New. The problem is I don’t want a whole new row with everything (UD02 and UD05) just the new stuff to make UD05 from the information that I have selected on the row that already has the UD02 information.
Is this something that I should be using the Query to object and object to query mapping on? The part shown below?