trying to fill multiple fields in forms with one qr code
i’m new to this whole thing and have no idea how to code/use expressions. i’m trying to make it so if i scan one qr code, it fills up multiple fields in the app form instead of scanning one field at a time.
[@kranji\_node\_store](/u/kranji_node_store)
[[scannable3]](https://aws1.discourse-cdn.com/business5/uploads/appsheet/original/3x/0/c/0c80b79dc2e966f5f39445343db2293bc4053a07.png "scannable3")
[[scannable2]](https://aws1.discourse-cdn.com/business5/uploads/appsheet/original/3x/d/d/dda4d711966f5851f213fa67ca11b4116745d6b5.png "scannable2")
[[scannable1]](https://aws1.discourse-cdn.com/business5/uploads/appsheet/original/3x/2/0/2026bb2ce6db7cfecff5276a0c82da1448a1a622.png "scannable1")
> Hi pliz assist me, I need a code that can allow the login form to search for pin number stored in another form example when a customer enters the pin number and clicks ok button the login form searches if the pin number exists in the bank details form ..thanx in advance
> 
> 


post code This is usually done by giving each submit button a unique id/name:



```
<input id="sub1" name="sub1" type="submit" value="Submit Form 1" />
```

it's a rubbish name/id, I know, but you get the idea. Then in your form handling routine:



```
if(isset($_POST['sub1'])){
  //code for handling this form
}
``` > 
> i want to create ap application which generates popup alerts at the day of event ocurs as well as a day before the event will occur in a specific time interval as well.. events are stored in database and they are all date fields .. so i want to link those fields to create popups .. help me .
> 
> 
> 


In order to help you, you must first provide us with what you have achieved. We do not write code for you, simply correct and enlighten on mistakes. The behaviour must be because you are appending the same array to both of the arrays.  

Try appending a different array for cell*code and cell*type separately. not [full disclosure] a linux person per se.

something similar to the following should work:

https://www.unix.com/shell-programming-and-scripting/68166-converting-integer-string.html

start simple with just enough code to test the concept.

see if it works and modify/correct as necessary.

then if it still does not work, then post your documented code accordingly along an explanation of what is or is not happening as you expect or desire. you can use lazy evaluation so if the first expression returns true it will not check the second expression. just change the ‘or’ in your statement to ‘orelse’ so it would be:

“string.isnullorempty(message) orelse message.contains(”!")" You are mixing [expressions](https://docs.microsoft.com/en-us/dotnet/api/system.linq.expressions.expression?view=netframework-4.7.1) with [lambda expressions](https://docs.microsoft.com/en-us/dotnet/api/system.linq.expressions.lambdaexpression?view=netframework-4.7.1). There are many posts showing how you can combine lambda expressions, but the essential part is to compose expressions from lambda expression [bodies](https://docs.microsoft.com/en-us/dotnet/api/system.linq.expressions.lambdaexpression.body?view=netframework-4.7.1) and rebind the [parameters](https://docs.microsoft.com/en-us/dotnet/api/system.linq.expressions.lambdaexpression.parameters?view=netframework-4.7.1).


The later is usually achieved by a custom [`ExpressionVisitor`](https://docs.microsoft.com/en-us/dotnet/api/system.linq.expressions.expressionvisitor?view=netframework-4.7.1) like this:



```
using System.Linq.Expressions;

public static class ExpressionExtensions
{
    public static Expression ReplaceParameter(this Expression expression, ParameterExpression source, Expression target)
    {
        return new ParameterReplacer { Source = source, Target = target }.Visit(expression);
    }

    class ParameterReplacer : ExpressionVisitor
    {
        public ParameterExpression Source;
        public Expression Target;
        protected override Expression VisitParameter(ParameterExpression node)
        {
            return node == Source ? Target : base.VisitParameter(node);
        }
    }
}

```

Now regarding the EF Core combined query filters. 


Using dictionaries and expression lists seems overcomplicated for what are you doing. Since [`IMutableEntityType`](https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.metadata.imutableentitytype?view=efcore-2.1) provides read/write access to the [`QueryFilter`](https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.metadata.imutableentitytype.queryfilter?view=efcore-2.1#Microsoft_EntityFrameworkCore_Metadata_IMutableEntityType_QueryFilter), the same can be achieved with a small set of a custom extension methods.


All they go inside a class like this:



```
using System;
using System.Linq.Expressions;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

public static class QueryFilterExtensions
{
}

```

First method:



```
public static void AddQueryFilter(this IMutableEntityType target, LambdaExpression filter)
{
    if (target.QueryFilter == null)
        target.QueryFilter = filter;
    else
    {
        var parameter = target.QueryFilter.Parameters[0];
        var left = target.QueryFilter.Body;
        var right = filter.Body.ReplaceParameter(filter.Parameters[0], parameter);
        var body = Expression.AndAlso(left, right);
        target.QueryFilter = Expression.Lambda(body, parameter);
    }
}

```

This is a non generic method which combines the exiting filter with passed filter using `AndAlso` (C# `&&`) operator and shows the aforementioned lambda expression combining principles.


However it's not so useful directly, like inside your entity type configuration loop (it can, but requires you to build manually the lambda expression instead of letting C# compiler do that). So here comes the second method:



```
public static void AddQueryFilter<T>(this IMutableEntityType target, Expression<Func<T, bool>> filter)
{
    LambdaExpression targetFilter = filter;
    if (target.ClrType != typeof(T))
    {
        var parameter = Expression.Parameter(target.ClrType, "e");
        var body = filter.Body.ReplaceParameter(filter.Parameters[0], parameter);
        targetFilter = Expression.Lambda(body, parameter);
    }
    target.AddQueryFilter(targetFilter);
}

```

It's a generic method - not quite type-safe, but allows you to use a compile time lambda expression and bind it to the actual entity type as follows:



```
foreach (var entityType in modelBuilder.Model.GetEntityTypes())
{
    if (typeof(IDeleted).IsAssignableFrom(entityType.ClrType))
        entityType.AddQueryFilter<IDeleted>(e => e.DateTimeDeleted == null);
}

```

Looks better, isn't it :)


The last custom extension method is complement to (replacement of) the standard EF Core generic [`HasQueryFilter`](https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.metadata.builders.entitytypebuilder-1.hasqueryfilter?view=efcore-2.1#Microsoft_EntityFrameworkCore_Metadata_Builders_EntityTypeBuilder_1_HasQueryFilter_System_Linq_Expressions_Expression_System_Func__0_System_Boolean___) method:



```
public static EntityTypeBuilder<TEntity> AddQueryFilter<TEntity>(this EntityTypeBuilder<TEntity> target, Expression<Func<TEntity, bool>> filter)
    where TEntity : class
{
    target.Metadata.AddQueryFilter(filter);
    return target;
}

```

and allows you to replace



```
this.AddToDict<DbMyEntity>(t => t.Name == null || t.Name == "Something");

```

with the more convenient



```
modelBuilder.Entity<DbMyEntity>()
    .AddQueryFilter(t => t.Name == null || t.Name == "Something");

```

**Update (EF Core 3.0):** `QueryFilter` property has been replaced with `GetQueryFilter` and `SetQueryFilter` extension methods. its kind difficult to understand in my POV but not impossible  

imagining it while reading


can you show some codes? or samples on what you want to achive? thanks i was able to use something similar. i have just seen online that we’re not able to extract column values for calculated columns? is there any other way of extracting this data?

query = """ query { boards (ids: %s limit: 20, page: 1) { id name columns … Check if any of the values in the cells are null.  

If they are you need to modify your code to check for null conditions before using `ToString()`.