IsCreated

Interface Function

Determine whether to create Doc.

Request Parameter (Reload 1)
Parameter Required Type Remarks
searchItems false string Search criteria, which is the serialized value of List<SearchItem>.
userId false string Current user by default

[warning] Warning

The reload has two default hidden parameters, the current user and IsDeleted=0.

Request Parameter (Reload 2)
Parameter Required Type Remarks
searchItems true List<SearchItem> Search criteria
formAlias false string The default parameter is formAlias in the current route.
Return Data Type

string,if the corresponding document is found, the document ID is returned, otherwise Null is returned.

Call Sample (Reload 1)
//Query whether there is a record with FormStatus=NotOk in the document created by the current user.
var createdId = Service.IsCreated("[{\"Name\":\"FormStatus\",\"Value\":\"NotOk\",\"Operator\":\"Equal\",\"Method\":\"AND\"}]");
if(!string.IsNullOrEmpty(createdId)){
    ReturnData.ReturnUrl = Service.RedirectUrl(createdId);
    return ReturnData;
}
Call Sample (Reload 2)
//Query whether there is a record created by DemoUser under the current form.
var search = new List<SearchItem>()
{
    new SearchItem() 
    {
        Method = "And",
        Operator = "Equal",
        Name = "C4-CreateBy",
        Value = "DemoUser"
    }
};
var createdId = Service.IsCreated(search);
if(!string.IsNullOrEmpty(createdId)){
    ReturnData.ReturnUrl = Service.RedirectUrl(createdId);
    return ReturnData;
}
© Digital Maker Product Team all right reserved,powered by Gitbook该文件修订时间: 2022-08-16 10:55:23

results matching ""

    No results matching ""