Any way to use a dynamic value in Wait Condition? - dynamics-crm

I have several workflows where the users want to set the number of days before a date defined in an entity (e.g. contract end date) to receive a notice. Within a Wait Condition, is there a way to set the number of days before to an int attribute in the entity, rather than hard code it? Any workarounds if that is not possible?

No, unfortunately there is no way to do this out of th ebox. The best way for you to do this, assuming you're using a dropdown for the day values, would be to code each branch of wait logic for each selected value in the dropdown.

Related

Number filed is not processed correctly

I use Oracle Apex, I want that my 'display only field' is updated automatically. Well, when I use dynamic actions like this select 5 * price from ... or, for instance, random values, it works absolutely correctly, the field is filled with the value 5 * price (or set new random value). But when I use select :P4_COUNT * price from, the filed is empty. I think that the problem in :P4_COUNT (it is a number field) but I do not know what to do.
In the Dynamic Action, look for "Items to Submit" (usually under the SQL or PL/SQL code). Put the names of items that need to be submitted to session state prior to running the code. Also, note that currently, all values in session state are strings. So it's probably best to use to_number if you need a number.

How to calculate a value using previous rows' values in Talend

I have a dataset like below.
Dataset:
Now the business logic is to find out the last paid date for each of the loans. I tried using a tmap component, it calls a java routine that has a static variable last_paid_dt which would store the transaction date when the daily deposit > 0. However, when the daily deposit is less than 0 the static var would not get changed. This works fine when the amount paid is 0.
Issue - See the red highlighted values in the table below
When the amount paid is reversed a day or after, the last paid should be from previous non-reversed positive amount. I was not able to get that done.
Also when a new loan id starts processing I need the static variable to get reset which is not currently happening.
If my current methodology is wrong, please help me doing in a better and efficient way. Thanks
Expected output:
First of all you need to use a Map component, with the key being the loanId.
You don't want to overwrite the value. I.e. If the key exists in your map, then do not overwrite it with a new value.
You can use the globalMap if you want, in that case I'd do:
globalMap.get("loan_"+loanId) != null ?
globalMap.put("loand_"+loanId,loanDate) : loanDate
then later:
globalMap.get("loan_"+loanId)
Not elegant, but works. a More elegant would be to define your own map that you put into globalMap and after the process null it out, so you free up the memory. But this all depends on the complexity of your job.

Count how many times one post has been read

Is it possible to show how many times one post has been read? In WordPress there is a plug-in,https://wordpress.org/plugins/wp-postviews/
I don't know whether there is such a plug-in in Anypic of Parse to count the times?
Of course it will be nice if it can display who has read a post as well.
Thanks
I'm not sure which language you working on.
But anyway you need to create:
Array column in Parse.com
And then just make query to add his name when viewWillAppear
Now you can count the array to get integer number for views and you can display their names from the array.
Two options are;
Add a viewcount column and increment it whenever needed.
Add an actions table which consist all actions within your webpage or app. This way you can store more data(custom analytics) in it like button pressing etc.. When you want to check the viewcount you can just count objects with specific type. For iOS SDK countObjectsInBackgroundWithBlock does this job.

How to find maximum Value in JDE (RDA)

I would like to knew how can I find the maximum value in column in JDE Solution? Would you mind to show me the way to do it? Because I am not able to do it by using JDE RDA.
What do you mean by:
..i not able to do it by using JDE RDA..
You don't know how to use it or you're using the FDA?
Well, in RDA you can use the Aggregate Maximum Of, doing a Level Break on the column you want the maximum value.
On FDA you need to code your logic, something like:
MaxValue = 0
Begin Loop through the table
If table.column_you_want > MaxValue
MaxValue = table.column_you_want
End If
End Loop
Depending on your needs, if you are looking to find the next available ID to use in your table, there is already a concept well implemented in JDE to keep track of the next unique id for a table or even a process.
Unique id for a table
Look at the program P00022 which hold a next number by table. There is the business function X00022 you can use in your report to retrieve the value.
Unique ID for a process
Look at the program P0002 which holds next numbers by modules for specific document type. Use the business function X0002 to access the values in your RDA.

Core Data - Sorting results conditionally on values from a to-many-relationship

Hello I have an app with an Event entity that has a to-many-relationship to a Date entity that contains MULTIPLE startDates and endDates for each event.
In my list view I need to sort the events by the next available startDate (or endDate) from the to-many-relationship.
First I created a transient property in the Date entity that made all the necessary calculations (comparing to present date etc) but then quickly realized that
you cannot sort the fetchedResultsController using a transient property.
I cannot make the calculations at the time the start and end dates are created, because there is more than one startDate and endDate for each event and which ones to use
can only be determined on demand by comparing them to the present date.
Any guidance on which way to go with this would be greatly appreciated.
You might need to go about this backwards.
The simplest solution would be to fetch Date objects that fall into the needed range and then display the Event objects they relate to.
Otherwise, you will have to use a SUBQUERY in your predicate.

Resources