Gravity Forms - Setting Entry ID as hidden field of current form - gravity-forms-plugin

I am tying to use this filter to update an existing entry:
https://docs.gravityforms.com/gform_entry_id_pre_save_lead/
However, in the documentation it says:
This assumes that the entry ID to be updated has been submitted with the form from an input which as the input name "my_update_entry_id".
For my scenario it would be ideal if I could capture the Entry ID as part of the entry submission (in a hidden field). Is there a way to do this?
Alternatively, I could dynamically assign an entry ID prior to it being created?

If you are updating an entry, I'm assuming it already exists. If it already exists, you should be able to use dynamic population to populate the existing entry ID into a Hidden field on the form. Then you can use the example from the gform_entry_id_pre_save_lead documentation to update the desired entry on submission.
Here's an existing snippet that does the same thing: https://gist.github.com/spivurno/32e914d67723f89717be2904ce6234c4

Related

Custom Work Item Type: Adding Unique ID Constraint

I created a custom work item type (WIT) and I added a field of type integer for usage as unique identifier. It is called ID and is a required field.
I would like the following constraint:
When a user creates a new work item of this type and inserts a value for ID, a check is run to verify that there is no work item of this type that already has the same ID. If so the user should be prevented from creating the work item.
The point is to avoid having multiple work items of this type with duplicate unique IDs. I looked into the "Rules" section to see if I could add a constraint to check for pre-existing integers of the same value, and prevent the user from creating the WIT if it already exists in the system. However I was not able to find a way to do so. I also tried making the field of type identifier but that just forces you to user a person (not number) as an identifier.
Your goals are not clear in your question. You already have ID (or System.Id as system reference) for each work item type. You do not need to create something new. Rules in work items types do not support complex logic (Sample custom rule scenarios).
As a workaround (if you need the second id for your work item type), you can:
Set default value 0 for your field.
Create a custom app to:
Find 0 ids: Query By Wiql.
Updated them to the calculated value: Work Items - Update.

Getting current item ID in SharePoint Infopath form

Can we get the current item ID value while submitting the data in InfoPath form.
I need to use this and concatenate the ID with other field value. Tired "Max(#ID) + 1" function but it wouldn't solve the problem.
I know it can be done using calculated column or workflow.
It needs to be done using InfoPath form ? Is it possible ?
You already figured it out yourself. Im assuming you are trying to use the ID in naming it.
Create a blank field.
Then add that field to your submission naming concat.
Create a receive data connection (assuming you havent) to that library.
On the Submit rule add the query action to that library and a set field action to set that new blank field with max(ID) + 1. Make sure Submit action is last.
That should do it unless Im missing something as I have used this many times!

How to retain the value of an editable text field in a Lotus Notes form every time the user opens it?

I have a form in Lotus Notes containing an editable text field.
Once the user enters a value in that field, it gets saved properly when I check it by opening the document from the back-end.
But I need this value to be seen in the form every time the user opens the form.
Because it is a configuration form where the user should be able to see all the values saved.
For example, a field which contains the path to download a report. And it should be an editable field itself. Is there any way to do this? Any sort of clue or help would be really appreciated. Thanks in advance!
The value of an editable field stored in a document does keep it's value every time the user opens the document.
It sounds like you may ask for something else. You want User A to create a document, enter a value (i.g. a download path) and save the document. When User A or User B later creates another document based on the same form, the previously entered value should be the default. Is that what you mean?
In that case you could simply use #DbLookup or #DbColumn in the formula language in the Default Value property of the field.
Or create a lookup view with the previously created document, sorted descending by date, then use the GetFirstDocument method of the NotesView class to get the first document in that view and read the value out of it using the GetItemValues method of the NotesDocument class.
Performance tip: If you make sure the value you want to look up is visible in the lookup view you can use the GetFirstEntry method of the NotesView class, then use the ColumnValues property to get the value, this is much faster.
Solution is to use #DbColumn in the default value of the editable text field of my form

Creating Keyword/Tag System in FileMaker 14

I have a FileMaker 14 database of events. I want to be able to tag each event with keywords. Therefore, I have created a three tables, structured as such:
Events ---< Tags >--- Keywords
Now, in order to add keywords as tags to an event, I want to make sure the keyword has not already been added and that it exists in the tables of keywords. If it doesn't exist, it should be created and then added as a tag.
In order to implement this, I thought I could have a global field where the user enters the keyword they want. Then a script would do the following:
Enter keyword in global field
Set variable $eventID wtih ID of current event
Set variable $keyword with value from global field
Check if $keyword is present in Keywords table
if yes
get id of $keyword and put in variable $keywordID
check if $keywordID is already tagged to event
if yes
display message, "this keyword has already been added to this event"
if no
create new record in Tags table with $keywordID and $eventID
clear global field
exit script
if no
create new record in Keywords table with $keyword value in keyword field
set variable $keywordID with value of id field
create new record in Tags table with $keywordID and $eventID
clear global field
exit script
This is the step-by-step script I am attempting to write. However, I am stuck at how to check if the $keyword is present in the Keywords table and then how to get the id of that $keyword from the Keywords table.
Please let me know if you have suggestions or if there is an easier way to tackle this issue.
There are many ways you could handle this - for example, you could have a relationship linking the global field (in any table) to the Keyword field in the Keywords table. Then you would know instantly if a related record exists and what is its ID.
Alternatively, you could perform a find in the Keywords table. Or your script could attempt to create a new record and watch for an error caused by the validation of a keyword as unique failing.
BTW, is it possible for a keyword to require a global change? If not, why do you need a KeywordID? You could simply use the keyword itself, and validate it as unique. (Yes, I know you've been told it's bad practice. It is. Usually. When there is a reason.)

rails 3.2 check if hidden field has value while sending form

I have inside of a form one hidden field, which must be empty when the form is submitted.
Is any value in it, i want to set a flag in the database column.
How can i realize the check if the value of this hidden field is not filled?
Is it an issue for controllers or for models?
It is an issue for the controller. You want to check the value of that field in the create and update actions and store what ever you want to store there.