Found an oddity that I would like to know if ...

(Marc Dillon) #1

Found an oddity that I would like to know if it is intentional behavior, or a bug?

When you have a parent and child table, with the child ref-ing back to the parent and ispartof=true. Then you go and edit the parent record, and it shows a list of child records. If you select ‘new’ from that inline view, it automatically links the new child record to the parent record. However if you first select ‘view’ from the inline view, and then hit the ‘add’ button, it does NOT automatically link the parent records.

I imagine this is so because technically you are viewing a filtered set of ALL records of the entire child table, and so the ‘add’ button will add any record to the child table, not just one associated with the parent.

My feedback, if this is intentional behavior, is that this is not very intuitive. Since the user is viewing all child records associated with the parent, it would make sense that adding a record here would also automatically associate it with the parent. In my specific case, the parent ref column is marked as required, but also hidden (since it is a uniqueid() nonsense string), but even though it is required, it will allow a child record to be created without any reference.

(Aleksi Alkio) #2

I tested this with an existing app and for me it’s still adding the correct parent record.

(Marc Dillon) #3

Hmm, that’s odd. You’re right it works as expected with another parent-child set that I have in the same app.

I am investigating further, but not sure where to look. Everything seems to be as it should be. Any suggestions?

(Aleksi Alkio) #4

When you use the inline view as a table view, it will add the Ref value. If the view type is something else, it won’t add it.

(Steven Coile) #5

@Aleksi_Alkio How do you set the inline view to something other than table?

(Aleksi Alkio) #6

If you create an additional view and you set the position to Ref, it uses this view for your inline view instead of the system generated inline view.

(Marc Dillon) #7

@Aleksi_Alkio Yes that is what we seem to have discovered here. But why does it act like that? I guess that’s back to my original question; is it intended behavior, or a bug? Why can’t we change an inline view to a deck?

(Aleksi Alkio) #8

It’s not a bug, it’s by design.

(Marc Dillon) #9

So the reason I made the inline view a deck in the first place was to see a set of action icons, that I created, more easily. Now that I’ve switched it back a table view, I’m having some trouble getting those actions to display properly. Two of them act on one column, and the third acts on a second column. All three are set to ‘display inline’. I’ve set the column order for the table view to what I want, but the values aren’t being displayed in the two mentioned columns, they have been replaced by the action icons. And the column headers are also not there. If I switch to action off of ‘display inline’, then I can’t see them anymore in the table, but I do see the values.

(Aleksi Alkio) #10

Add one “empty” virtual column and then attach those actions to that column so they won’t hide that real column.

(Marc Dillon) #11

How do you attach the action to a column?

(Aleksi Alkio) #12

When you set the action’s Prominence to “Display Inline”, you will see an option “Attach to column”.

(Marc Dillon) #13

@Aleksi_Alkio I would suggest that you pass on to the dev team that this area needs a bit of cleaning up. I saw no indication, and no obvious documentation, that I should not have changed an inline view from table to deck, and since it seemed to work in all other ways except this one small thing, then I also feel like it should be a possible option. I definitely don’t feel like one could say that there is not a “bug” here. Maybe there should be an option for setting a certain view to be the inline view? I’ll go ahead and put a feature request up for this.

+Steve Coile Thanks for sticking with me here.

(Steven Coile) #14

Adds from an inline table generated with REF_ROWS() will include the backref automatically; adds from an inline generated by any other means (e.g., FILTER() or SELECT()) will not.

(Aleksi Alkio) #15

@Marc_Dillon sure. I will discuss about this.

(Marc Dillon) #16

That makes sense. The inline in the parent record is definitely ref_rows generated.

But once you click the view button, do you still call that an “inline” view. Could it have something to do with changing the child’s view type from table to deck?

(Steven Coile) #17

The view shown by clicking view from an inline table is governed by the ref-position table view configuration, as is the inline view, so I consider them the same view. The inline one, though, is limited to a number of rows configured by UX > Options > DETAIL VIEW > Inline row limit.

(Steven Coile) #18

What do you mean by, “changing the child’s view type from table to deck”?

(Marc Dillon) #19

Sorry, mispoke. I changed the _Inline system view from table to deck. I don’t think that should matter at all, just don’t know where else to look.

(Steven Coile) #20

The view used is determined by the view type, not the view name. If you changed the view type from table, that view configuration no longer governs the inline table view.