pass value from query grid to create object form

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
swiftinitpvtltd
Posts: 370
Joined: Sat Apr 28, 2018 3:33 am
Location: India
Contact:

pass value from query grid to create object form

Post by swiftinitpvtltd »

I have a query grid with multiple different BO(Products, Prices etc) add operations. I can write process to create BO's when a specific item is clicked and that BO will have default value from row clicked. The issue in this approach is "Continue and cancel" behavior in process(I just need form new entry with default value set really do not need continue and cancel at bottom). How do I eliminate that? If I can not then how do I just use plain create object command and pass selected row one column value as default value of newly created object one form value?
swiftinitpvtltd
Posts: 370
Joined: Sat Apr 28, 2018 3:33 am
Location: India
Contact:

Re: pass value from query grid to create object form

Post by swiftinitpvtltd »

I found one way but not working fully...

ENTER NEW BO WITH BO.myvalued=valuefromgridrow AND VIEW

but how do I set redisplay form on save? because with this approach if I have dynamic dropdown that saves on change form closes automatically. In standard create BO command it has redisplay form on save. I need that in above command.
ddumas
Posts: 389
Joined: Tue Apr 23, 2013 11:17 pm

Re: pass value from query grid to create object form

Post by ddumas »

I hate the continue and cancel buttons, next form, previous form, etc. I never use Enter New. I always call a process that does a Create BO With ... and then do a View, which acts like an Edit . That skips all the "unecessary noise" associated with Enter New. I have many forms and not a single one uses Enter New.

Dave
swiftinitpvtltd
Posts: 370
Joined: Sat Apr 28, 2018 3:33 am
Location: India
Contact:

Re: pass value from query grid to create object form

Post by swiftinitpvtltd »

Thank you! The only issue with create and view is if user clicks on new and then he does not want to save and closes browser then we have records sitting there and we can not delete it because we can not track browser close or other user events. With enter new the record is still not created I guess in DB but I will check create and view as an option. Thanks again. May be you have additional flag that says InDRAFT while creating and then delete it over weekend if user has not processed it.
ddumas
Posts: 389
Joined: Tue Apr 23, 2013 11:17 pm

Re: pass value from query grid to create object form

Post by ddumas »

Right. In DfraftFlag would work in that scenario. Until Enter New works without any buttons at the bottom I will not use it.
ACDC
Posts: 1138
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Re: pass value from query grid to create object form

Post by ACDC »

Thank you! The only issue with create and view is if user clicks on new and then he does not want to save and closes browser then we have records sitting there and we can not delete it because we can not track browser close or other user events. With enter new the record is still not created I guess in DB but I will check create and view as an option. Thanks again. May be you have additional flag that says InDRAFT while creating and then delete it over weekend if user has not processed it.
Also , If the Object is already created, then wouldn't the use of"IF NEW" be lost. The use of "IF NEW" for rule optimisation is key... in my mind
ddumas
Posts: 389
Joined: Tue Apr 23, 2013 11:17 pm

Re: pass value from query grid to create object form

Post by ddumas »

I don'rely on the IS New logic, but understand if you do. You could set a flag for that, and then set false. Messy. Here is the Bottom Line IMO. Enter New renders buttons on the bottom of the screen that serve no purpose IMO. I put all my functionality in Panel Operations at the top of the form where the user can see them, without scrolling. The buttons at the bottom only cause pain for me. That's why I never use Enter New. It really should be fixed.
ddumas
Posts: 389
Joined: Tue Apr 23, 2013 11:17 pm

Re: pass value from query grid to create object form

Post by ddumas »

Scratch that...partially. I do not use Enter New, and my IF NOT(BO IS NEW) Business Rules work fine. Yes, it's the IF BO IS NEW that you would have to resolve. I guess since I have always been able to resolve those with a CREATE BO WITH... by setting default values, that I have had no issues.

I would still rather set a "IsNewRecordFlag" in the Create BO, and set back to false after, than to have to deal with those buttons at the bottom from an Enter New.
BLOMASKY
Posts: 1470
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: pass value from query grid to create object form

Post by BLOMASKY »

What am I missing re: enter new? I use it a lot. What is wrong with the buttons on the bottom? You said something about scrolling, if I have a form that is too long for the screen, then I have multiple tabs. I agree an entry form should always fit on the display with no scrolling.

Also, my mindset, as I change development tools, is to try to use the functionality that the tool provides and not to make the tool work my way. Instead I try to do things that maximize the best features of the tool. I write code very differently when using Aware and Sencha.

Bruce
ddumas
Posts: 389
Joined: Tue Apr 23, 2013 11:17 pm

Re: pass value from query grid to create object form

Post by ddumas »

When using Enter New, the Close button does not save edits, or warn of unsaved changes. I have tried Enter New in popup forms, in this scenario and have confirmed results. If something is supposed to work, I need to depend on it to work all of the time. As you know, popup forms allow you to do a modal operation, and additionally take advantage of a wider form, than displaying an entry form in a tab at the top.

Additionally, I have defined all Panel Operations at the top (Close Save, etc...), above the form (where they should always be defined IMO) , so I do not need or want to show any buttons at the bottom.

So, unfortunately, since the Enter New does not work for me, I do not use it.

Dave
Post Reply