Skip to main content

I have two different dates in different screens Ex(stock item and Branch) and i would like to update the minimum value of the stock item date and Branch date into a different screen. Can it be done via generic inquiry and Business events. thank you in advance

I’m not sure I understand your question. Would you be able to take some screenshots and give a little more detail about how and when this would ideally take place?

 

In answer to the idea of using a Generic Inquiry, GI’s don’t usually update records, but rather display information. The exception to this is using the Mass Field Update or Mass Actions feature. Perhaps that’s what you had in mind.


Hi @dilipnukala3,

We have accomplished similar by using a Generic Inquiry in combination with an Import Scenario and a Business Event.   

  1. Create the generic inquiry and make it visible on the UI.  This assigns it a screen name.  
  1. Select the GI as data source for a new “Data Provider”.
  1. Create an import scenario to update the screen using the Data Provider you created in step #2
  2. Create a business event which is triggered by a record change.  The screen name will be the GI created in step #1 above.  On the subscriber tab, select the import scenario that you created in step #3.

Once you piece it all together correctly we have had good success with this methodology.

Hope this helps!

Laura

 

 


Hi @dilipnukala3 ,

Correction - for step #2 above you need to create a Data Provider of the type Business Process Provider, otherwise it won’t be available to select on the subscriber tab in step #4.

Hope this helps!

Laura


Thanks for your support. I have tried the same but the data change isn’t Happening. I want to get the maximum of two date values and update it. I have described the field in the Import Scenario. 

All the launch dates are in dateteime format.

 

Maxmimum value of Branchaccount_usrLaunchDate or Itemreplenishment_launchDate

=IIf((DateDiff( 'd', (ItemWarehouse_launchDate], DBranchaccount_usrLaunchDate] )<0),&Branchaccount_usrLaunchDate],hItemreplenishment_launchDate])

or 

=IIf(

or 

=Max(CInt(MItemWarehouse_launchDate]) ,CInt(]Branchaccount_usrLaunchDate])). This shouldnot be working as the date to int conversion. 

 


Hi @dilipnukala3,

When you “Import” the data on the “Import By Scenario” screen you should be able to confirm if your formula is working correctly.  I believe that either of your first two syntaxes should work, but that is assuming that the user defined field is of the appropriate data type and that it always contains data.  If one or the other field could be null then you might need to account for that in the formula.  You can use the IsNull function to check for that condition, something like this:

=IIf(IsNull(pItemWarehouse_launchDate], ‘1/1/1900’)<IsNull(9Branchaccount_usrLaunchDate], ‘1/1/1900’) , eBranchaccount_usrLaunchDate], cItemreplenishment_launchDate])

If both dates are null this formula will return the date ‘1/1/1900’.

Also, instead of embedding this logic in the Import Scenario, you could consider moving it to the the Generic Inquiry for the Data Provider.  It might be a little bit easier to debug there. Once you have the formula working correctly in the GI, you can just choose the calculated field to update from in the Import Scenario.

Hope this helps!

Laura


Reply