Behavior question

NCD
Silver 2
Silver 2

Hi, @Aurelien 

Made a mistake and posted this, as a reply to a solved post.

I Still donโ€™t understand Behaviors enough to pull this off, would you or anyone in the community be kind enough to give me some insight on this?

untitled (1).png

โ€ƒ

I have a dashboard view with Interactive mode ON, which has (from left to right);

  • Product (View type Table)
  • bom_Inline 
  • Material_Inline 

When I click on a certain product, and then press the cart button in Material_Inline I want it to;

  • Create a new bom
  • add the Product_ID of the product I clicked on
  • and add the Material_ID of the cart I clicked on

 

At the moment, I just have one simple behavior,

For a Record of this table: 

Material

Do this:

Data: add a new row to another table using values from this row

Table to add to:

bom

Set These columns:

Material_ID = [Material_ID]

 

This adds the Material_ID into the bom, but does not add the Product_ID

0 7 102
7 REPLIES 7

When you click on a product within the product table view, that selection is not available to be used anywhere except in the row selected event of the table view.

So starting from the material table will not give you the necessary information (your product selection) to be able to populate your newly added bom row.

What you could do is to create a temporary table - let's say product_selected - and when you select a product, update that table using the row selected event. (It would be nice if AppSheet can store temporary values in a more elegant way, but I think this is the only way available now.)

After that you have access to that information within the action you invoke on the material table (LOOKUP(USEREMAIL(),....)).

If your app is a multi user app, which I believe it is, then you need to make the product_selected table 'user aware' by security filter.

Others may have better ideas.

Thank you, I think I understand what you mean.

Will try to make a sample app and wait for other ideas as well!

Unfortunately, you cannot have click-based actions running in a dashboard view with interactive mode on. Interactive mode would just ignore any click actions you had setup for the view and replace them with navigation to the corresponding row in other views of your dashboard. 

Thank you, yeah made a mistake.

I'm going to make the material view type a card or a deck view!

@Joseph_Seddik , you are correct, Unfortunately my proposed solution does not work with the interactive mode on..

What can be done is to use a slice for the bom and use the product_selected as a filter. That way, the save event can be enabled to control entry into product_selected and also, the relevant bom rows are displayed according to product selection.

I am assuming that material table is not affected by this filtering because it needs to show materials not yet used in the bom rows associated with the selected product.

Would it still be the same approach,

if I made a set of rows that are prefilled with the bom_ID & Product_ID & have the material_ID go into each or would that be easier?

Top Labels in this Space