App Studio - DataView without database binding?

  1. …so you have to press the hotkey again to pull new results.

Pressing again still shows an empty view.

  1. On the rest-erp > Rest Services > ERP Rest Args, the Parse From Response Path is not needed.

Good to know.

  1. …After correcting the grid model binding from Custom_SubAssemblyStatus to SubAssemblies, did you recheck the views in Dev Tools? … you have it currently bound to Custom_SubAssemblyStatus and I see a view called Custom_SubAssemblyStatus_0_0…

This layer has been added to a converted dashboard. The Custom_SubAssemblyStatus_0_0 data view is the one that was created during the conversion and can’t be removed. I’m ignoring it and creating my own for use with the rest-erp action.

  1. What version are you on? …

2021.2.3, the newest cloud version I believe

Got it working! :smiley:

Here’s what I think happened: I noticed two javascript errors in the console when testing that were complaining about missing event targets. When I first added this layer, I simply deleted the existing dashboard grid and added my own. This was because I couldn’t figure out how to get the grid to stop loading its BAQ. Binding it to the new view and removing the BAQ ID wasn’t working. Additionally, since events are no longer delete-able I ignored them.

This time around, I started from scratch on a new layer and hid the old grid and added a new one. I copied the configuration from the old rest-erp event action and this time it works.

This might just be a correlation but not causation thing, but it seems like those event errors were throwing a wrench in the rest of the works.

[edit]
Now the last piece of the puzzle is how to reference view data within the JSON payload of the rest-erp aciton. I’ve seen various question mark syntax around here.[/edit]

Ah yeah, the events will definitely hose things up like that.
Changing native grids gets really messy due to those events. Definitely had some woes with that here: How To: Adding Columns to Existing Kinetic Grid - Experts’ Corner - Epicor User Help Forum (epiusers.help)

For using the stuff in the JSON, it should just be a matter of:

{
   "PropertyName": "{SubAssemblies.Column}"
}

Use or remove quotes where appropriate.

Works like a charm! This is becoming off topic, but can data be interpolated with regular label text with a similar syntax? For instance, I’d like to use the ep-label component and dynamically set its text based on the currently selected row text.

Qty Issued: {SubAssemblyView.Calculated_Issued}

doesn’t work. Is there another syntax for this, or is it simply not possible.

Doesn’t appear to be possible.

Okay, so it’s possible, but not easy or intuitive and requires digging into the DB.

  1. Place your label and save your layer

  2. Preview your layer and open Dev Tools (F12)

  3. Select the label element to inspect

  4. Grab the id from the ep-label component. (Not sure why this isn’t exposed in App Studio… @bconner ?? )

  1. Create an event. Set the trigger to whatever you need it to be to invoke the change.
  2. Add a Property-Set widget and set the Components property to the label ID you found in your layer JSON.

  1. In the props, set the Prop property to labelText and set the Value to be {View.Column}

image

DynamicLabel

Thanks! I was wondering if I could use property-set to accomplish this. I’ve tried to use it for other use cases, but it either had no effect or I couldn’t guess at the correct property name. It looks like they’re camel cased?

There was a version where the property-set widget only worked on native controls. Depending on how long ago you tested, that could be it.

As far as the syntax, yes–it’s camel case.

Odd, this doesn’t seem to be working on components on a slide out panel. It does work on components that live on the same page.

I can’t get this to work either. You could submit it as a bug.

It looks like the slide out panel component (and its components) isn’t rendered at all until opened, then removed from the DOM when hidden. This is probably the more efficient way to do it, especially on beefier apps. It’s too bad you can’t bind a specific property of a component (hidden, labelText, etc) to a DataView column or global variable. Then when it’s rendered, the property simply uses the bound value.

1 Like

Agreed. It would be much nicer to be able to set the text to, say {DataView.Column}. That would be the ideal way to go to get around this hackiness.

You could submit it as a bug.

What is currently the best way to do this? Epiccare?

Well, if you believe it’s a bug, then yes, but what you described makes a lot of sense, so it’s probably “working as designed”.
Knowing that, I’d probably submit it to Epicor Ideas: Kinetic Ideas (aha.io)

1 Like

@Ishkaran can you re share that video. The link has expired. Thanks.

I don’t think you’ll get it. Ishkaran doesn’t work for Epicor anymore.

bummer. The question on this post is similar to what I am wanting to do. I am new to epicor but have a back ground in web development angular, nodejs, mongodb etc. I am helping to design our configurator in app studio. I have not added much logic but would like to have an area on the form
with a text box or other controls where I fill the out the data and have an “add/update” button that will add the data to the grid and clear the form. With the ability to click a row, if needed ,to edit the data then update the row. I need to use this data later for my “keep when” rules.

This may be a little off topic for this thread so I started a new one here.

1 Like

I know it’s bit old - but link expired.
Maybe it can uploaded to a place where it will not expire?

I believe this is probably the video you all have been seeking.

1 Like

Link works. Thank you.