Antd. Form.List and Form.Item get data from initialValue - antd

Can you please tell me how can I pass data from initialValue (line #187) to (line #217)?
I need to do a check, and for this, I need to get the index of the current object I'm accessing and the main data set (that is, initialValue).
I used this example - https://ant.design/components/form/#components-form-demo-dynamic-form-items-complex
The problem is that I don't know how to get the original dataset from the .
The idea is this: The user can change the name/description of the fields only for the newly created objects that they added through the button (as in the example), but for those fields that were immediately created from the data set - they cannot, that is, they have should be on.
Tell me, please, how can I do this?
I haven't been able to solve the problem for over an hour now.
I need to somehow assign a custom ID (from a dataset) for each form.
And then pass the information of this field to the validator. If it has id != null => the field becomes disabled.
But damn, how to do it.... 🙁

Related

How to access object field in qaf step from stored variable

In my previous question I was looking for a way to access and store return value of the function in qaf step. I was provided with the following:
When create new user using "{'name':'user1','password':'user123'}"
And store into 'newUser'
Then system should have user '${newUser}'
Now, I'd like to know how to get value from object/collection stored.
If it is a simple object named newUser which has field Id. How would I pass Id on next step?
And, if return is List, how to get by index from stored list?
Resolved issue on my own. If anyone faces same unknowns, here is how I solved it.
For requirements to work around response data, parsing same stored objects in properties by specific fields or collecting data from other structures such as Maps or Lists, create common functions with #QAFTestStep annotation to get data for class member name, map by key or list by index and so on... Add those in common steps and then write stepname text in gherkin format with parameters specified. Let me know if someone needs help, always ready to help out...

Memory does not refresh automatically in Recast.AI

I have created a entity called #USER-NAME and have set that as a requirement.
Now, for the first time when the entity is detected in the conversation - say, "I am John" , then the memory is set to John. On subsequent encounter of the same entity with different value - "I am Dave", the memory remains unchanged.
I have seen the edit memory option, which provides 1. reset memory 2. set to a value . For the option 2, it does not provide a way to set to the value of #USER-NAME, instead only provides option to enter static values.
How can I update the memory every time the value of the entity changes ??
EDIT
Hi, I am attaching some screenshots to show what's exactly going wrong.
I have a Entity named '#USER_NAME' that saves the user name in a memory variable .
I make the following conversation -
The JSON payload after the conversation is as follows. This works perfectly-
I update the conversation again by providing a new user name.
This triggers the entity just fine. You can see the entity being detected properly.
However, the memory value remains the same.
What I wanted was the memory variable to replace 'Dev' with 'John'.
Remember that:
memory <> Intent
You can set memory in the message section or update automatically using for example a requirement in this case every time the skill is trigged it will replace the value in the memory ID
EDIT: Because the set memory field expect a JSON you can't use memory as you want, but if you reset that memory ID shomewhere relevant in the chat (in my sample I delete it right after saying Hi XXX) so when the skill is trigged again it will "replace" it with the new value
In the Requirement I set the golden entity #Person to variable "name" and if is missing I ask her name.
Sample Image
the memory is a persistent object so if you want to reset it you need either to have specific conditions within the builder or go through a webhook to have a backend code to reste the memory.

Archer to Archer Data Feed in RSA Archer

Need to create Archer to Archer Data Feed that should set value of two fields as NULL in a cross referenced application, if the value of a field is Approved in first field. I am not getting how can I send a NULL value to the fields through data feed??
Archer doesn't have "NULL" value, but you still can get it done like this:
Step 1. Calculation. Open your data feed configuration and go to the source definition tab. Add a new field to the end of the list and make it calculated.Add formula to check value of 1st field that present in the data source and if it is equal to "Approved" then return empty string.
Something like this
=IF([field field] = VALUEOF([first field],[Approved]), "","SOMETHING ELSE")
The key here is to have this calculation return an empty string when you need it - "".
I suggest you to test your calculation in the calculated field in the application before you put it in the calculated data source field.
Step 2. Data feed mapping. Now you need to map new calculated field in your data feed to the field you want to remove value from. Go to the mapping tab in your data feed configuration and map the field. Make sure to selection options "Replace value" and "Empty Values" - this way existing value will be replaced even with empty values.
Similar approach works for me in multiple data feeds.
Good luck!
You can use novalue() function in the calculation
I don't believe there is a concept of NULL in Archer. The closest you're probably going to get is blank/empty. To do that, in the Data Map tab of your data feed, click the edit icon under Actions column. Check the box that Empty Values should be populated rather than ignored.
Assumption is that what is in the question is the only task required by the data feed.
Create report with the filter set as First Field = Approved
Fields to display should contain tracking id (tracking ID which is configured to System ID) of the Target app along with the Tracking ID of the Cross-Reference App.
In Source Definition add new source and give it an adequate name as clear or Null if you want
Where it says Raw Data Field in the drop-down, update this to static. Leave the source as not configured or unconfigured.
Map this newsource to the 2 fields that you are trying to clear. In Options set to Replace and uncheck add unknown and set to populate empty values.
Map the Tracking ID of the Target app and map the Tracking ID of the cross-reference.
Set key field definition for both apps to the tracking id
Set data feed to update only. Remove checkmark for create
If your are doing more than just clearing the 2 fields, then
Stan Utevski answer is mostly correct except you must have the field you are evaluating for "Approve" in the fields to display of your report. Otherwise the calculation will not validate.

How to update value in angular ui typeahead directive if no matching option is found

I've an array of objects containing title and salary which is used in typeahead directive.
I display department name and get entire object as value.
If none of the options match, I want user entered string to be converted to object still. Is there any way to update that?
This answer is pretty late, but I would just use ng-blur (to trap the end of the users input) along with a variable bound to typeahead-no-results. Then test if the variable is true in the method bound to ng-blur, and, if so, make an object out of the String supplied by the user and push it to your data source. Simple example found here.

Adding values to custom (DataExt) fields when adding line items to existing quickbooks Estimates

I'm trying to find the best way to add a value to a DataExt field when adding a line item to an existing Quickbooks transaction (in this particular case an Estimate). I can add a value for a DataExt field when adding line items to a NEW Estimate since the IEstimateLineAdd object includes IDataListExt. However, IEstimateLineMod does not appear to include IDataExtList. There also does not appear to be support for defMacro/useMacro either. I would like to avoid having to go back and dig out the line items (using some combination of their data values) from the Response data, get the TxnLineIDs for each one and then use DataExMod to add the custom data field after the fact.
However, IEstimateLineMod does not appear to include IDataExtList.
Correct.
There also does not appear to be support for defMacro/useMacro either.
Also correct.
I would like to avoid having to go back and dig out the line items (using some combination of their data values) from the Response data, get the TxnLineIDs for each one and then use DataExMod to add the custom data field after the fact.
That is exactly what you need to do.

Resources