"Retrieved value" field in custom screen - customization

I am trying to create a custom screen in Infor EAM 11.4, and add a "retrieved value" field to the screen. This consisted in:
Adding an an alpha field F1 to the custom screen, basic, can be null.
Creating a query Q1 for retrieving a single-row, single-column table from the value of F1.
Adding another alpha field F2 to the custom screen with : Retrieved value checked, Source field = F1, Retrieved value query = Q1.
The only thing I am missing is HOW exactly does EAM pass the value of F1 to Q1 where retrieving the value of F2, if it even does?

According to the Functional Brief "Infor EAM User Defined Screens", the arguments in this case are passed in parameters named after the sequence number of the defined fields.
Example:
The value of the field with sequence number 1 will be passed in bind parameter :1
The value of the field with sequence number 7 will be passed in bind parameter :7

Related

Quicksight User Entered Variables

Is it possible for Quicksight to allow user entered strings as variables for a calculated field?
For example if i have the user enter value x in a filter list (or elsewhere), can I have Quicksight save that variable x so i can create a calculated field such as:
ifelse('item' = x, 1,0)?
You can create calculated fields with parameters. I let you here an example:
Example

pass field value to a function .extra()

After trying for hours, I am coming here. I have the following model:
class Items(models.Model):
date=models.DateField()
giver=models.IntegerField()
Class Givers(models.Model):
name=models.CharField(max_length=25)
Basically, an item could be given by donators from Givers model or it could be bought by user. If given, giver field stores id from Givers model. Else, it is 0. Now I want a query that will list out my items. If giver>0, I need to show the name of the giver. I can't create relationships here. This query has brought me so close and works like a charm on literal values but I want to provide the 'giver' field instead:
data=Items.objects.all().extra(select={'giver_name':giver_name(1,False)}).values('giver_name','id','date')
It works like a charm even if given any number (exists or not exists). But I want to do something like this but it fails cos field is not found or undefined:
data=Items.objects.all().extra(select={'giver_name':giver_name(giver,False)}).values('giver_name','id','date')
giver_name is a function that accepts id of a giver and a boolean value and returns a name.

How to obtain field values from a sitecore droplist used as a predefined list

In my template I have a field type of Droplist which maps to a Sitecore folder holding values for the Droplist which in this case is Colours. This is so that an editor cannot make a typo or invent a colour this is not in the pre-defined list.
So that colour is based off a template I call TAGS which has a single field type of 'colour' and here I create a series of items using that template to create the colours for the swatch list.
When I access the main template I duly see the colour values in that Droplist so its working as I would expect it because I can access that fields values:
tileValues.Attributes["class"] += " tile-" + Item.Fields["Tile Colour"].Value.ToLower();
However I have realized its not using the field value of the template but rather the name I have called the item. SO its just a happy mistake that its achieving the result I wanted.
However how would I obtain the actual field value for that item in the end code. I have scenarios where there will be multi lingual editors so we may name the tags as rouge, blanc etc which is what the editor will see on selection in the Droplist but we need the colour value of the field to still say red or white etc
I tried:
Item.Fields["Tile Colour"].Item.Fields["Colour"].Value
But this failed despite the API hint implying its valid.
I hope this makes sense and someone can help me obtain the actual field value and not the items name.
As Sitecore Climber wrote, don't use Droplist field type - it stores item name only and you cannot get the item itself in the code behind.
Use Droplink field type - it stores ID of the item.
Then you can get the item:
Item colourItem = Sitecore.Context.Database.GetItem(Item["Tile Colour"]);
if (colourItem != null)
{
string colour = colourItem["Colour"];
|

Django skip inline field

I have an inline where the first field is always selected by default. Since both are required, is it possible to only validate and insert/update when the second field is also selected or I need to also define a default value for the second field? (Otherwise I will always get errors on the rows where only the first field is set...)
Update
I'm overriding the first widget (TextInput) render. If I set to empty then it works but I want this field to behave almost like a label.
def render(self, name, value, attrs=None):
if name == "opinion_set-0-topic":
value = "first thing"
if name == "opinion_set-1-topic":
value = "second thing"
if name == "opinion_set-2-topic":
value = "third thing"
Update 2
I need something like, if field 2 isn't set (gives "This field is required.") then bypass the form error and simply ignore the rows where this happens...
The situation is:
you have a main form to save
you have an inline subform with mandatory fields, some with default values and some without default values
Then, if you don't set all mandatory values in the inline, you get "This field is required" error.
One way to skip this situation is defining "extra = 0" in the admin.py definition of the inline form.
This way you are not forced to insert an inline object along the main one, but you can do it if you want, just clicking "+ Add another <inline>".

Oracle APEX - Validation against a List of Values

In Oracle APEX, is it possible to create a validation so that field B cannot be null if a "Modem" is selected in field A? (field A is a Select List that contains a List of Values that uses a query to receive it's list of values)
Thanks Tony,
Your solution makes sense but it didn't work in my case.
Here is my validation:
The result is not what I expected. I would like an error only to show up for "Unit Ip Address" when Modem is the selected Device Type when the field is null.
Additional Info that describes the "Device Type":
Yes - see this example, where field Commission cannot be null if "Salesman" is selected in field Job.
It is simply a "Not Null" validation on item P15_COMMISSION, with a condition to perform the validation only when P15_JOB has the value "Salesman"
This is the validation definition I used:
Note that the condition on the validation is based on the return value of the LOV, not the display value. In my case they happen to be the same, but in yours they are not and your condition should be based on the ID of the device type rather than the description.